Relax render blocking audit for CDN-loaded assets (e.g. fonts)
See original GitHub issueFeature request summary
The “Eliminate render-blocking resources” audit is being flagged whenever font stylesheets from a font CDN (e.g. Google Fonts) is present.
This makes sense because it blocks rendering, but given that the fonts are coming from a shared CDN and would often already be cached, should such assets have the same negative weight some other render-blocking resource that is loaded from the same origin? I realize that double-key caching in browsers will invalidate this, however.
Nevertheless, when running an audit on an AMP page, there is actually logic present which will force font stylesheets to get loaded asynchronously (see font-stylesheet-timeout.js).
When a framework does this, should this be taken into consideration in the Lighthouse audit?
What is the motivation or use case for changing this?
The AMP framework requires font stylesheets to be placed in the head
. Developers of AMP pages do currently have any alternative way to embed Google Fonts. So this audit is telling users about something they can’t currently change (other than to remove the font altogether), and since the AMP framework unblocks such resources, the “eliminate render-blocking resources” audit here may flag something that is already being taken care of.
How is this beneficial to Lighthouse?
Improve the actual impact of the “Eliminate render-blocking resources” audit.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top GitHub Comments
Oops sorry I meant https://github.com/GoogleChrome/lighthouse/issues/2832 😃
@patrickhulce 10046 is this issue 😃