• Resolved funsail

    (@funsail)


    I thought single files were used to create the combined file.
    However pagespeed is saying those single files css/js are also being referenced?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    autoptimize_snippet_* are used to create the combined file (they’re internal cache), but autoptimize_singel_* are indeed referenced; these are excluded files that were not minified and that AO as per config does not aggregate, but (since 2.4) does minify (you can turn that off, see AO FAQ).

    hope this clarifies,
    frank

    Thread Starter funsail

    (@funsail)

    I see. I’ve been using this for a while now. Now i’ve excluded stuff so that I basically have 2-3 css/js aggregates for the whole site. But I found now

    This page has 20 external Javascript scripts. Try combining them into one.
    This page has 8 external stylesheets. Try combining them into one.

    I can’t really do much now, since I guess every page has a range of different things.
    Is there another way? Ie instead of excluding a file because I’d have 2 aggregates differing by 1 line, why not use the supserset, and only have 1?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    hmm …

    -> Some (or many) of the external JS/ CSS could be on 3rd party servers, which AO cannot optimize (don’t know your URL any more so can’t check)

    -> I guess there are methods that could be found to create 1 superset CSS and 1 superset JS file, but at that point there are 2 potential issues;
    a. you’re pushing resources to the user (s)he does not need
    b. the additional CSS/ JS might be need on page X but might conflict on page Y, so you risk introducing errors that way

    frank

    Thread Starter funsail

    (@funsail)

    Well there’s a bunch related to /wp-includes/js/jquery/*.js
    There are a few google/fb externals, but really a lot of css especially that seem local.
    Almost 10 from within wp itself, not plugins!

    Here’s a sample har file
    https://tinyurl.com/y7j9mogq

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I see, looks like you’re excluding prettyphoto & jscomposer for example?

    As I wrote, I would avoid forcing them in on every page, to high a risk of other things breaking really ??

    Thread Starter funsail

    (@funsail)

    Well I added exclusions 1 by 1 until I only had 1 main file left. However I have a couple of exact same aggregates that ended with different names.
    I did things like telling some plugins to add js/css to every page so that they could be aggregated.
    So I’m not really sure with today’s browsers and caching and speed, is it better for my site to have one aggregate and lots of little files, or maybe 3 or 4 aggregates and fewer smaller files? And with pipelining that’s a really matter whether I have separate files or not

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I have a couple of exact same aggregates that ended with different names.

    well, theoretically there had to be at least one character difference after aggregation but before minification, as the name is based on an md5-hash of the aggregated un-minified code.

    So I’m not really sure with today’s browsers and caching and speed, is it better for my site to have one aggregate and lots of little files, or maybe 3 or 4 aggregates and fewer smaller files? And with pipelining that’s a really matter whether I have separate files or not

    those are good questions. you can turn aggregation off in AO (it’s optional as from 2.4, although default on) and compare results (do test on “mobile” restricted bandwidth/ higher latency and who have significantly more aggresive cache purging logic)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘autoptimize single files’ is closed to new replies.