tadghh / web-performance

I didnt make this

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Performance Optimization Strategy in 2023 - Source

Compiled by Vitaly Friedman. https://smashed.by/perf-strategy

Get a big picture

1. Clean up and reorder the

Studied and analyzed by Harry Roberts

2. Manage critical CSS and CSS loading

  • Define and inline critical CSS per template, but beware of implications
  • Create critical.css and non-critical.css for each template
  • Use outline: 3px solid red to check layout shifts
  • Remove all external SVGs (inlined into CSS)
  • Adjust Browserslist to avoid legacy browsers (IE)
  • Use the print stylesheet loading trick to load non-critical CSS async

3. Improve Web Font Loading

4. Optimize the rendering for LCPs

  • Maximize image loading performance with AVIF
  • Run an image analysis tool for images
  • Add preload for LCPs (usually images or large headings)
  • Preload responsive images with img srcset and image sizes
  • Choose the lightest SQIP option or BlurHash
  • Add Early hints if the server needs “server think time” to return pages
  • Optimize images for high-density displays
  • By default all non-critical images include [loading=](https://web.dev/browser-level-image-lazy-loading/)``["](https://web.dev/browser-level-image-lazy-loading/)``[lazy](https://web.dev/browser-level-image-lazy-loading/)``["](https://web.dev/browser-level-image-lazy-loading/) and [decoding="async"](http://www.js-craft.io/blog/what-does-the-html-image-decoding-async-attribute-do-and-how-can-it-help-us-to-improve-performance/) (what decoding means)
  • All images should have [height](https://www.smashingmagazine.com/2020/03/setting-height-width-images-important-again/) and [width](https://www.smashingmagazine.com/2020/03/setting-height-width-images-important-again/) defined
  • Above-the-fold images should include loading=``"``eager``"
  • Use facades for videos
  • Base64 encoding LCP to improve perf on mobile (AVIF and/or JPEGs) (maybe)
  • Always convert GIFs to MP4
  • Check LCPs in Chrome’s performance panel

5. Deferring/delaying JS and third-parties

About

I didnt make this