• Resolved Dylan Houlihan

    (@dylanhoulihan)


    Hi, just a quick question. If I’m using the “Defer render-blocking JS” function on the Siteground Optimizer plugin, is it counter-intuitive to manually apply the “async” and “defer” attributes to specific scripts with AssetCleanup pro?

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

    (@gabelivan)

    @dylanhoulihan it is because if you use such a function that will combine JS files and then defer them, then obviously any rule per file will not take effect. So, what usually people do when using “async” and “defer” from Asset CleanUp, is that they are not using any external plugins to combine JS files. It’s not even recommended as there are more resources used. Asset CleanUp also combines JS files and if the feature is enabled it will group the files so that all “async” ones (for instance) will be grouped in their own combined JS files, not together with the “defer” ones.

    Often, just combining JS files and deferring them (which is the quickest way to optimize JS files) does not work well and that’s why applying “defer” to a few of them while leaving other ones as render-blocking is the way to go.

    PS: I also don’t recommend you use combine CSS files using SG Optimizer. Please do it via Asset CleanUp Pro instead. You can use SG Optimizer for other functions such as page caching.

    Thread Starter Dylan Houlihan

    (@dylanhoulihan)

    Thanks for responding Gabe. I’ve been working on my site speed for a while now and I seem to be stuck.

    I wasn’t using CSS combination in SG Optimizer before. Would you say it’s worth using CSS combination + JS combination with Asset CleanUp Pro? I’ve just switched over and it doesn’t seem to have had a huge impact on my speed. Do you offer one-on-one help with stuff like this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Deferring JS with SG optimizer + Defer and Async on Asset Cleanup Pro’ is closed to new replies.