• Resolved john53

    (@john53)


    Hi

    Probably a daft question but is there any way to use the css and js optimization tools on an individual page rather than the whole website?

    I know I can do some limited optimization at the bottom of each page but would like to be able to use tools like “CSS Files Minification”, “Combine loaded CSS (Stylesheets) into fewer files”, “Inline CSS Files” etc for an individual page.

    Thank you.

    Best regards

    John

    The page I need help with: [log in to see the link]

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

    (@gabelivan)

    @john53 technically, at the moment, you can choose the pages for which you do not want any optimization (e.g. by editing the post/page and use the “Asset CleanUp: Options” meta box OR by specifying the pages in the “Settings”, here’s how to do that: https://assetcleanup.com/docs/how-to-exclude-the-plugin-from-loading-on-certain-pages/).

    However, there’s no feature that would just exclude all pages from optimization and you will be able to choose which ones you want to have the plugin working for. Does that help? Is there a reason you would like to have this feature? Are you worried you might have pages that are broken by the site-wide changes the plugin would do?

    Thread Starter john53

    (@john53)

    Hi Gabe Thank you for the information.

    I have 2 problems that I am trying to resolve.

    The first is that I use autoptimize to optimize our website and it works very well but on the contacts page we load a google map using api.

    Autoptimize causes the map to load intermittently. Frank very kindly gave me some code to prevent the plugin optimising the contact page so the problem is resolved but the page loads a bit slower now.

    The second issue is I can sometime get significant performance gains by pre loading an image on a page and that speeds the individual page up significantly. BUT the pre load appears on every page on the website and causes all the other pages to load a resource that isn’t needed thereby slowing them down.

    From you reply I can see a way I could try to optimize just the contact us page. I could set your plugin to optimize css and js and then on each individual page and post apart from the contact us page exclude the plugin.

    At the end of the day it may not be that worthwhile since the loading of the google map is the thing that slows the page down the most. But you know how it is. We all get obsessed with getting our pages to load ever more quickly!!

    Thanks very much for your help.

    Best regards

    John

    Plugin Author Gabe Livan

    (@gabelivan)

    @john53

    Autoptimize causes the map to load intermittently. Frank very kindly gave me some code to prevent the plugin optimising the contact page so the problem is resolved but the page loads a bit slower now.

    I checked your website and the contact page loads super fast now, with a whopping 99/100 score in Google PageSpeed Insights for the mobile view which is excellent. I suppose you already had this page improved. It doesn’t seem to have been any problem with Asset CleanUp since the change on the map was a custom one, unrelated to the plugin.

    The second issue is I can sometime get significant performance gains by pre loading an image on a page and that speeds the individual page up significantly.

    Asset CleanUp doesn’t do any image preloading as there was never a feature like that. This is a request that is barely made during a year (I think there were a few people mentioning it) and due to the lack of demand, it wasn’t considered as a feature.

    All the audits are passed in Google PageSpeed Insight for the Desktop view which is great. As for the mobile view, the only thing Google reports is “Remove unused JavaScript” because the JS code that is loading is likely not needed, but for ~20 KB it’s not worth the hassle of going through each file and load alternative versions of them. Here’s how you could do that in case you will ever be interested: https://assetcleanup.com/docs/how-to-load-an-alternative-lighter-version-of-a-file/

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘css & js optimization by individual page?’ is closed to new replies.