• Resolved steemansnick

    (@steemansnick)


    Super plugin!!! By far the best minify and speed up thingy there is!

    Only one question, I still get the “error” in google pagespeed that I have render blocking of javascript and css above the fold. (And also the google font) Is there a way to move it to the footer, of at least get rid of it?

    It’s the last thing that keeps me struggling for a long time already.

    Many thanks in advance! And keep up the good work! Absolutely love it!

    Nick

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Raul P.

    (@alignak)

    I think you need to understand what blocking javascript and css means first, because this is not doable without manual extensive work.

    Blocking CSS exists for a reason, which is to tell the browser how “to render” the design before showing anything else. If you are to remove the render blocking css, you would need a preloader with javascript or else your page would show without any style (broken design) and then, if you have a slow mobile connection, it would take a few seconds to start showing properly.

    CSS is meant to be blocking and should be decided by the theme authors, not plugins.
    You could inline all the css in order to bypass that message on pagespeed… but this is nonsense. While you would have better score, your site would be slower and you wouldn’t take benefit of browser cache for external css files (which are downloaded once only) and instead, you would force people to download all your inlined css every pageload.

    But great, you would have better pagescore while in reality, visitors would be annoyed.
    It’s also a misconception that better score means better rankings… but that’s another story.

    The same is valid for javascript. Many sites need to load jquery before anything else, so you cannot even defer javascript for that reason alone.

    For example, a slider will possibly have a div, that calls a jquery function inline… but if you have deferred it, jQuery would be undefined when the dom loads that div, resulting in errors and the slider not working.

    The only time you can defer javascript is when your theme absolutely doesn’t rely on jquery to do something as it loads. Even in these cases, submit or search buttons often rely on it to submit a form, so if a user is fast enough to open the page and quicly perform a search, it will not work until he finishes downloading that deferred javascript (but he will think the site is broken, because there’s no way for him to know when jquery is ready or not before clicking anywhere).

    Again, the solution would be a preloader that unlocks once the deferred javascript loads… but yet again, that’s for the theme authors to implement.

    Also, are the users on mobile willing to wait for several seconds for a preloader?
    I certainly not, so I’ll go to another page… but you’ll still have good pagespeed score.

    Perhaps you could take a read here:
    https://blog.wp-rocket.me/the-truth-about-google-pagespeed-insights/

    • This reply was modified 8 years, 1 month ago by Raul P..

    Wanted to send you a private note, but couldn’t find a way on this site to do it.

    ALl I wanted to ask was if you’d be OK with me publishing your last response on my blog? It’s just such a great explanation to this whol issues with CSS and JS, that I know it would be a good post.

    I’d absolutely make sure it was clear it was written by you,bit like a guest post. But I also wanted to use this example as a way of showing how amazing your support on this plugin is and has been. It’s frankly exceptional support, and blows the socks off even commercial support, and I’d love to use you and your plug-in as a shining example of a great wordpress plugin and how a developer takes the responsibility of being a dev author seriously.

    Completely understand if you’d rather not, but I at least wanted to ask. I’d show you a draft first, and you’d be free to make changes etc if you did think it was an ok idea.

    Regardless, your plugin has made a terrrific difference to my site, and I had tried lots of differing ways and plug-ins before this. My experience with your support was nothing but exceptional.

    You’d do well to offer Donations for your work, I for one would contribute some ££’s to your work. ??

    Keep it up…

    Whilst I’m here, I did have one very little question:

    When I make CSS changes to my site etc, do I need to delete the existing processed files like I would empty WP ROcket and CLoudFlares cache? Or is this not necessary?

    Plugin Author Raul P.

    (@alignak)

    No problem, you can copy, edit or do whatever you like with my answer.
    This is commonly available information anyway.

    But thanks.

    • This reply was modified 8 years, 1 month ago by Raul P..
    Thread Starter steemansnick

    (@steemansnick)

    Thanks for your reply. I kinda knew all this, but was still hoping for some magic I guess… Must admit I got a little obsessed with the pagespeed thing also ??

    Thanks and keep up the great work.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Eliminate render blocking above the fold’ is closed to new replies.