我们学习了闪电算法是什么?闪电算法有哪些影响以后,对百度闪电算法有了一个大致的了解:

1、闪电算法主要针对手机站点,PC站点为次要。

3、通过手机端主页打开的时间,来判定网站的优先排名。

2、时间算法划分阈值,分别为≤2s、>2s≤3s、以及>3s三档,时间越短排名越高。


如何应对闪电算法

1、将同类型资源在服务器端压缩合并,充分利用浏览器缓存,减少网络请求次数和资源体积。

2、检查服务器硬件或网络的负载情况,例如硬盘、内存、cpu、带宽等。如果硬件或网络带宽都正常,这个时候需要查看一下nginx、tomcat、数据库的错误日志,观察数据库的慢查询日志等。分析是否有语句查询过慢,需要优化等。带宽的问题,增加带宽就好。

3、整个网站架构上考虑,是否搭建web集群等高并发方案,从整体架构上去优化。

4、非文字元素(如图片,视频)指定宽高,避免浏览器重排重绘。

5、JavaScript放到文档末尾,或使用async方式加载,避免JS执行阻塞渲染。

6、Mysql语句优化的问题,需要开发人员的配合。

7、非首屏图片懒加载,将网络带宽留给首屏请求。

8、将CSS样式写在头部样式表中,减少由CSS文件网络请求造成的渲染阻塞。

9、数据库做高性能方案,比如多实例,或读写分离。如果数据库太庞大,需要拆库或拆表。

10、把CSS样式写在头部样式表中,减少因为CSS文件网络请求而造成的渲染阻塞。

10、置缓存数据库和CDN,将用户的请求定向到最合适的缓存服务器上。

11、善用Chrome浏览器开发者工具排查问题。

希望广大站长视网站自身情况,参照建议自行优化页面,关注页面加载速度体验,或使用通用的加速解决方案(如MIP),不断优化页面首屏加载时间。


联系电话:
1585150508*
QQ交谈:
小编
站长微信:
站长邮箱: service@qingjiuzhubei.com
78.73msRequest Duration2MBMemory UsageGET seoSchool/detail{id?}.htmlRouteAuth status
    • Booting (12.09ms)
    • Application (69.15ms)
      6 templates were rendered
      • site.zixun.seoDetail (resources/views/site/zixun/seoDetail.blade.php)9blade
        Params
        0
        cateAlls
        1
        newDetail
        2
        comment
        3
        hotnews
        4
        zuixinNews
        5
        xiangguan
        6
        t
        7
        d
        8
        k
      • layouts.site.layout (resources/views/layouts/site/layout.blade.php)21blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        cateAlls
        7
        newDetail
        8
        comment
        9
        hotnews
        10
        zuixinNews
        11
        xiangguan
        12
        t
        13
        d
        14
        k
        15
        __empty_1
        16
        __currentLoopData
        17
        hotnewsVal
        18
        loop
        19
        new
        20
        cateAll
      • layouts.site.top (resources/views/layouts/site/top.blade.php)21blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        cateAlls
        7
        newDetail
        8
        comment
        9
        hotnews
        10
        zuixinNews
        11
        xiangguan
        12
        t
        13
        d
        14
        k
        15
        __empty_1
        16
        __currentLoopData
        17
        hotnewsVal
        18
        loop
        19
        new
        20
        cateAll
      • layouts.site.bottom (resources/views/layouts/site/bottom.blade.php)21blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        cateAlls
        7
        newDetail
        8
        comment
        9
        hotnews
        10
        zuixinNews
        11
        xiangguan
        12
        t
        13
        d
        14
        k
        15
        __empty_1
        16
        __currentLoopData
        17
        hotnewsVal
        18
        loop
        19
        new
        20
        cateAll
      • common.upgrade_vip (resources/views/common/upgrade_vip.blade.php)21blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        cateAlls
        7
        newDetail
        8
        comment
        9
        hotnews
        10
        zuixinNews
        11
        xiangguan
        12
        t
        13
        d
        14
        k
        15
        __empty_1
        16
        __currentLoopData
        17
        hotnewsVal
        18
        loop
        19
        new
        20
        cateAll
      • kefu.kefu (resources/views/kefu/kefu.blade.php)21blade
        Params
        0
        obLevel
        1
        __env
        2
        app
        3
        device
        4
        isMobile
        5
        errors
        6
        cateAlls
        7
        newDetail
        8
        comment
        9
        hotnews
        10
        zuixinNews
        11
        xiangguan
        12
        t
        13
        d
        14
        k
        15
        __empty_1
        16
        __currentLoopData
        17
        hotnewsVal
        18
        loop
        19
        new
        20
        cateAll
      uri
      GET seoSchool/detail{id?}.html
      middleware
      web
      controller
      App\Http\Controllers\Site\ZixunController@seoSchoolDetail
      namespace
      App\Http\Controllers
      prefix
      /seoSchool
      where
      as
      seoSchoolDetail
      file
      app/Http/Controllers/Site/ZixunController.php:197-230
      8 statements were executed9.16ms
      • select * from `new_cates` where `pid` = '3' and `new_cates`.`deleted_at` is null1.58ms/app/Http/Controllers/Site/ZixunController.php:202zzshuju
        Metadata
        Bindings
        • 0. 3
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 12. /app/Http/Controllers/Site/ZixunController.php:202
        • 20. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 54. /public/index.php:53
      • select * from `news` where `news`.`id` = '25353' and `news`.`deleted_at` is null limit 1400μs/app/Http/Controllers/Site/ZixunController.php:203zzshuju
        Metadata
        Bindings
        • 0. 25353
        Hints
        • Use SELECT * only if you need all columns from table
        • LIMIT without ORDER BY causes non-deterministic results, depending on the query execution plan
        Backtrace
        • 14. /app/Http/Controllers/Site/ZixunController.php:203
        • 22. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 56. /public/index.php:53
      • select * from `new_cates` where `new_cates`.`id` in ('126') and `new_cates`.`deleted_at` is null420μs/app/Http/Controllers/Site/ZixunController.php:203zzshuju
        Metadata
        Bindings
        • 0. 126
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 19. /app/Http/Controllers/Site/ZixunController.php:203
        • 27. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 61. /public/index.php:53
      • select * from `news` where `news`.`deleted_at` is null order by `id` desc limit 10830μs/app/Http/Controllers/Site/ZixunController.php:205zzshuju
        Metadata
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 12. /app/Http/Controllers/Site/ZixunController.php:205
        • 20. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 54. /public/index.php:53
      • select * from `news` where `news`.`deleted_at` is null order by `published_at` desc limit 10730μs/app/Http/Controllers/Site/ZixunController.php:206zzshuju
        Metadata
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 12. /app/Http/Controllers/Site/ZixunController.php:206
        • 20. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 54. /public/index.php:53
      • select * from `news` where `newscate_id` = '126' and `news`.`deleted_at` is null order by `id` asc limit 10700μs/app/Http/Controllers/Site/ZixunController.php:208zzshuju
        Metadata
        Bindings
        • 0. 126
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 12. /app/Http/Controllers/Site/ZixunController.php:208
        • 20. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 54. /public/index.php:53
      • update `news` set `browse` = `browse` + 1, `updated_at` = '2025-05-15 08:35:23' where `id` = '25353' and `news`.`deleted_at` is null4.02ms/app/Http/Model/News/News.php:170zzshuju
        Metadata
        Bindings
        • 0. 2025-05-15 08:35:23
        • 1. 25353
        Backtrace
        • 12. /app/Http/Model/News/News.php:170
        • 13. /app/Http/Controllers/Site/ZixunController.php:210
        • 21. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 55. /public/index.php:53
      • select * from `comments` where `news_id` = '25353'480μs/app/Http/Controllers/Site/ZixunController.php:214zzshuju
        Metadata
        Bindings
        • 0. 25353
        Hints
        • Use SELECT * only if you need all columns from table
        Backtrace
        • 12. /app/Http/Controllers/Site/ZixunController.php:214
        • 20. /vendor/silber/page-cache/src/Middleware/CacheResponse.php:38
        • 54. /public/index.php:53
        web
        array:2 [ "name" => "Guest" "user" => array:1 [ "guest" => true ] ]
        api
        array:2 [ "name" => "Guest" "user" => array:1 [ "guest" => true ] ]
          _token
          58RkXIXaNgLHnGq7qgnwak2jHFzcyMsA5HIchF2q
          _previous
          array:1 [ "url" => "http://data.winndoo.cn/seoSchool/detail25353.html" ]
          PHPDEBUGBAR_STACK_DATA
          []
          format
          html
          content_type
          text/html; charset=UTF-8
          status_text
          OK
          status_code
          200
          request_query
          []
          request_request
          []
          request_headers
          array:10 [ "accept-encoding" => array:1 [ 0 => "gzip, deflate" ] "accept" => array:1 [ ...
          request_server
          array:33 [ "USER" => "apache" "HOME" => "/usr/share/httpd" "HTTP_ACCEPT_ENCODING" => "gzip, de...
          request_cookies
          []
          response_headers
          array:5 [ "cache-control" => array:1 [ 0 => "no-cache, private" ] "date" => array:1 [ ...
          path_info
          /seoSchool/detail25353.html
          session_attributes
          array:3 [ "_token" => "58RkXIXaNgLHnGq7qgnwak2jHFzcyMsA5HIchF2q" "_previous" => array:1 [ "u...