You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pagespeed.apache.org by GitBox <gi...@apache.org> on 2020/07/15 13:25:00 UTC

[GitHub] [incubator-pagespeed-ngx] Lofesa edited a comment on issue #1697: prioritize_critical_css loads css twice

Lofesa edited a comment on issue #1697:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1697#issuecomment-658764918


   `prioritize_critical_css` works removing the css file link from the html code, change it by a css snipet (those used above the fold) and then put a javascript snipet at the bottom of the page wirt an onload event to load the rewrited css files.
   You are viewing 2 css files both w/o any rewrite by pagespeed?
   I ask for that because maybe you have a preload hint in the http headers, not in the code. In this case, the browser load these files 2 times, 1 not rewrited by pagespeed (cause pagespeed donĀ“t rewrite link headers) and 1 more time because the css (rewrited by pagespeed) is loaded in the code.
   These 2 files are different because in the header link is the original (https://yoursite.com/some-path/file.css) and in the html code  the file is loaded with a different url ( https://yoursite.com/some-path/file.css.ce.pagespeed.HASHCHAIN.css).
   
   Can you share a url to test?
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org