Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print stylesheet picked for Render-blocking resource #15969

Closed
2 tasks done
manzonif opened this issue Apr 19, 2024 · 1 comment
Closed
2 tasks done

Print stylesheet picked for Render-blocking resource #15969

manzonif opened this issue Apr 19, 2024 · 1 comment
Assignees

Comments

@manzonif
Copy link

FAQ

URL

https://pagespeed.web.dev/analysis/https-angular-dev/3inly8hhpn?hl=en&form_factor=mobile

What happened?

I'd like to bring to your attention that Angular provides a feature called inlineCritical that allows server-side injection of critical CSS directly into the HTML code, thus avoiding render-blocking stylesheets. To ensure that the stylesheet is not considered render-blocking when this option is activated, developers include the stylesheet link as follows:

<link rel="stylesheet" href="styles-IQDCL4WI.css" media="print" onload="this.media='all'">

However, in the recent version of Lighthouse, there seems to be no longer a check for media="print", which previously bypassed the audit and prevented it from being flagged as render-blocking. As a result, it is now being reported as render-blocking #13288 .

Here a screenshot from PageSpeed Insight of the angular.dev website.

Thank you.
Screenshot 2024-04-19 140637

What did you expect?

Style with media=print should be ignored for render-blocking resource's audit.

What have you tried?

No response

How were you running Lighthouse?

PageSpeed Insights

Lighthouse Version

11.5.0

Chrome Version

No response

Node Version

No response

OS

No response

Relevant log output

No response

@adamraine
Copy link
Member

This will not be the case in the next major release of Lighthouse. The changes from #15839 should correctly handle print media stylesheets in the render blocking resources audit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants