Optimize resource loading with the Fetch Priority API
Optimizing the resources your website loads is the best way of making sure it loads faster for everyone. Iâve talked before about ways of doing that, but turns out thereâs a new, better way of telling browsers what they should load first!
The article has many examples of use cases, but these are my favorites:
- Hero images: âImages inside the viewport typically start at a Low priority. After the layout is complete, Chrome discovers that theyâre in the viewport and boosts their priority. This usually adds a significant delay to loading the critical images, like hero images.â
- Image Carousels: âFor example, in an image carousel, only the first visible image needs a higher priority, and the others, typically offscreen initially can be set to have lower priority.â
