• Hi,
    I love the idea behind your plugin.
    I’ve found that on my site, combining .js and .css files might not be a good solution, as many pages have a slightly different combination of .js/.css files.
    As such, one single combined file will not work for all the pages, and the user does not make good use of his browser cache by having to redownload a new combined file for each different page he visits.

    Wouldn’t a good solution be to combine groups of .js and .css files, instead of “all” of them?
    e.g. I could combine all of the gravityform .js (I have about 6 because of all the add-ons), and serve those as a single file.. then I can decide which pages this group of .js needs to be excluded from (presumably, where there is no form!)
    Then I could determine other groups that are consistently on every page… and leave out the odd javascripts that are rarely on pages.

    Would love to hear what you think?

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

    (@gabelivan)

    @dichiarativo combining CSS & JS is a thing that differs from site to site and whether that site has HTTP/2 protocol enabled. Asset CleanUp doesn’t offer the option to choose which files to combine. Like other plugins, it takes all CSS & JS and minifies them into as few files as possible.

    If you do not use the combine feature (e.g. because your website has the HTTP/2 protocol on which downloads files in parallel), then you can just use the unload feature to select the files you don’t want to load. Some prefer to combine files into few (or just one file), even if they have the HTTP/2 protocol enabled, depending on the website. There’s an explanatory read me regarding this matter on Asset CleanUp (combine CSS/JS feature).

    Roughly, how many CSS/JS do you have loaded on the homepage and other high traffic pages?

    PS: You gave me an idea to write more documentation about this ?? I will also make reference to other articles developers have written about combining assets and HTTP/2 protocol.

    Thread Starter dichiarativo

    (@dichiarativo)

    Thanks for the reply!

    Our new site (currently under dev) has 40 javascripts and 33 .css loading on the homepage! Other top landing pages also have many. I was trying to improve things as load time is slow.
    We do not have HTTP2 (might be worth learning something about that!), and combining files and deferring does speed up the site very much, but when I noticed that each page had a different “combined” file, I thought maybe it wasn’t such a good idea after all!

    The problem is, each script really is used just 2%-15%… but in one way or another, I need to leave them there if I want that functionality..

    Thanks!
    Mel

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Combine just a certain group of assets?’ is closed to new replies.