My question might not be magento specific, but I'm curious, as I couldn't find the answer elsewhere (or failed to find the correct terms).

When I use Google Pagespeed on a magento 2 website with a template based on the basic one (or Luma), it says :

Remove unused CSS


But the code for the link to this CSS is :

<link  rel="stylesheet" type="text/css"  media="screen and (min-width: 768px)" href="https://www.magento2-website.com/static/versionxxxx/frontend/Template/base/fr_FR/css/styles-l.min.css" />

So it's supposed to be only use if width is more than 768px.

Any idea why Pagespeed thinks it have to be taken account ?

Thanks !

  • @ChrisRosenau yes I know that. That's not my question. And even if you remove unused CSS in your styles-l.css, it will still be taken account in the mobile tab of insights no ? And defering CSS is also a technique, but again, that's not my question :-) – Jean-Marc SALIS Oct 3 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.