YeeKal

boost page load speed

YeeKal
"#"

DNS

域名服务器

CDN

缓存

速度优化

vercel 首次访问会重启

performance connection:

  1. cloudflare 缓存设置, 若有更新,则手动清楚缓存
    • cache rules 和 page rules 配合
    • Cache Rules的优先级高于Page Rules
  2. First Contentful Paint (FCP) 优化白屏时间
  3. performance 分析
  4. gzip 压缩: dajngo gzip 800kb -> 16.5kb 346 ms
curl -H "Accept-Encoding: gzip" -I https://yeekal.store
>> HTTP/2 200 
>> age: 0
>> cache-control: public, max-age=0, must-revalidate
>> content-encoding: gzip
>> content-type: text/html; charset=utf-8
>> cross-origin-opener-policy: same-origin
>> date: Wed, 20 Mar 2024 09:05:38 GMT
>> referrer-policy: same-origin
>> server: Vercel
>> strict-transport-security: max-age=63072000
>> vary: Accept-Encoding
>> x-content-type-options: nosniff
>> x-frame-options: DENY
>> x-vercel-cache: MISS
>> x-vercel-id: hkg1::iad1::dzjc2-1710925538674-8d3d6969ec45
  • reduce search data size:
    • 1.83s -> 1.85s
    • size 87kb -> 27kb
  • blog data cache
  • Expires headers
  • vercel cache
 "rewrites": [
    { "source": "/:url*", "destination": "https://www.wgzdy.top/:url*" }
  ],
"headers": [
      {
        "source": "/static/(.*)",
        "headers": [
          {
            "key": "Cache-Control",
            "value": "public, max-age=36000, must-revalidate"
          }
        ]
      }
    ]

test tool

PageSpeed Pingdom
20240319 PageSpeed test Pingdom test
20240320

chrome Performance tool

  • Loading :加载时间
  • Scripting :js计算时间
  • Rendering :渲染时间
  • Painting :绘制时间
  • Other :其他时间
  • Idle :浏览器闲置时间

chrome Performance tool