Support » Plugin: W3 Total Cache » Help getting Minified file location

  • As I’m sure many of you know, Google PageSpeed Insights will sometimes complain about what it calls “render blocking css” when you test your sites.

    Their suggestion is to render only “necessary” CSS inline in the <head>. If you have CSS in an external file (as everyone does), the recommendation is to load this after the page loads. This seems pretty extreme, but that’s the recommendation. It appears to be a big blocker to improving one’s Mobile PageSpeed scores as well…

    You can use the PageSpeed Module for Apache or nginx to help you identify which CSS is actually “necessary”. Again, one can argue about the relative value of doing this, but it is Google’s current recommendation.

    I had a notion to use javascript to “Lazy Load” the CSS file by having a small script fire in the footer of my theme, injecting the CSS into the head. You can see an example of this technique here:

    I would then put <!– W3TC-include-css –> inside a <noscript> tag, thereby suppressing the placement of the minified CSS, as well as ensuring it appears for non JS browsers.

    So, the issue is I need to get the location of the minified CSS file somehow. Anyone know how one can access the location of minified CSS file with PHP in the footer?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Your page got 100/100 at Pingdom. There’s not much more you can do 🙂

    What plugins do you use for this speed right now?

    Not my page unfortunately :-). I’m trying to replicate the technique he’s using by lazy loading the minified CSS that w3tc produces. Unfortunately, I can’t figure out how to pull the hash and the Filename w3tc produces in my footer.php

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help getting Minified file location’ is closed to new replies.