GoogleChrome / web-vitals-extension

A Chrome extension to measure essential metrics for a healthy site
https://chrome.google.com/webstore/detail/web-vitals/ahfhijdlegdabablpippeagghigmibma?hl=en
Apache License 2.0
2.35k stars 105 forks source link

Warn when CWV antipatterns are detected #113

Open rviscomi opened 1 year ago

rviscomi commented 1 year ago

This post covers a few of the most effective CWV optimizations. Add the ability for the extension to console.warn when the page isn't following best practices.

A good proof of concept to start might be lazy-loaded LCP images.

tunetheweb commented 1 year ago

I'm concerned about all the nuances we might need here.

For native lazy-loading images that's probably fairly obvious and OK. For JS lazy-loading that takes more logic. And for delayed loading due to injecting the LCP element and/or having it in CSS that's more knowledge.

Then for fetchpriority we don't want to create more noise by pushing that on people if it won't even make a difference (e.g. it arrives, even before the images is needed).

There's often a lot of nuance in Lighthouse audits to handle these things and don't think we should be aiming to replicate that here.

rviscomi commented 1 year ago

Yeah, let's start with native lazy loading.