• Resolved alperinbiri

    (@alperinbiri)


    Hi,
    First of all, thank you for such a useful plugin. My question is about deferring JS and use of caching plugins, such as WP Rocket / WP Fastest Cache..

    After all the unusued scripts are eliminated, is there any point deferring (or async – ing) the necessary scripts, if I use a caching plugin?

    In other words, if all necessary js are kept and cached, does it make any difference on page speed, whether or not they are deferred via Asset Cleanup?

    Or is it better to leave them as they are, and defer via caching plugins?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @alperinbiri after the CSS/JS that are not needed on that page is unloaded, obviously, there are assets that are still needed and some might be render-blocking, hence, it’s very good to defer them when possible. This is to improve the first contentful paint. The browser will first download all the render-blocking CSS/JS files, then start showing content. We need to defer the assets to reduce the time until the first content is shown. Here’s a post in the plugin’s documentation that you will find useful: https://assetcleanup.com/docs/eliminate-render-blocking-resources/

    As for using a page caching plugin such as WP Rocket or WP Fastest Cache, obviously, it’s needed because Asset CleanUp doesn’t have (at least at this time) this feature to cache whole pages and then read the HTML source from its caching directory. Also, there are hosting companies such as Kinsta or WP Engine that have this feature without requiring a plugin installation.

    Even if you just defer all the CSS/JS that can be deferred, it’s still a good idea to unload the useless ones because the remaining ones that will be loaded are just smaller, leading to a smaller page size overall and better PageSpeed Score.

    Thread Starter alperinbiri

    (@alperinbiri)

    Gabe – thank you for such detailed answer, it makes perfect sense.

    Hopefully you can integrate caching feature in the future, I can see that your plugin being as a one-stop-shop.

    Thank you!

    Hello @gabelivan
    You mentioned that the browser will first download all the render-blocking CSS/JS files, then start showing content.

    I am using WP Rocket if I check the box “Optimize CSS delivery” I have serious CLS issues
    If I uncheck the box “Optimize CSS delivery” the CLS issues will be resolved but I receive “Eleminare Eliminate render-blocking resources issue”

    So how can I optimize CSS without render-blocking those CSS resources?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Deferring Js and use of caching plugins’ is closed to new replies.