Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Frank Goossens

    (@futtta)

    It will work, but it will be less efficient; “use google libraries” will offload requests for individual JS-files to Google, but those requests remain. Autoptimize’s goal is to aggregate as many JS-files as possible, to have less requests, but it will only act on local files.

    As an example, suppose you have a site with 10 local javascript files. In that case;
    * using Google Libraries you would have 10 requests, e.g. 6 local and 4 offloaded to Google
    * using Autoptimize you would have 2 requests, e.g. 1 aggregated JS-file and one file you had to exclude from aggregation
    * using Google Libraries and Autoptimize, you would have 6 requests, 1 aggregated JS-file, 1 file excluded from aggregation and 4 offloaded to Google.

    Now it would take testing (on webpagetest.org) to see what solution performs best, but my money would we on the Autoptimize-only solution, as extra requests tend to be more costly, even if to Google.

    Hope this helps,
    frank

    Thread Starter BackpackersUnion

    (@backpackersunion)

    Thanks for the great explanation! I’ve begun testing it out and I’m pretty sure your theory is going to prove correct. One additional benefit of the plugin I mentioned is it checks to see if the script is already loaded into the users cache to bypass having to downloaded it again, but what you said makes sense where the checking process might be more expensive then just downloading the single bundled JS file.

    A few follow up questions I had (Sorry for the length!):

    1. I’m trying to figure out what the “CDN Base URL” options is looking for? I use CloudFlare primarily but also have access to MaxCDN which I might start to implement alongside or instead of CloudFlare. Do you know what information I should be asking for from the CDN’s?

    I’m assuming this option will look for image URL’s in the CSS and then push them to the CDN? Is there any scenario this option shouldn’t be used?

    2. The option “Generate data: URIs for images?” I’m not clear on. I do use a lot of “background: url(‘image’);”, in my css for page background and button icons, is this what this is intended to optimize? Also, any scenario it shouldn’t be used (i.e. lots of images referenced in CSS but not used on all pages?)?

    3. I’ve noticed after clicking “Save Changes and Empty Cache” several page loads are much slower. Is this Autoptimize locating a new JS files (CSS on first page) and compressing them? So, should I navigate around the site after a “Save…” to, essentially, ‘load up the plugin with the files’?

    Sorry for the barrage of questions. I’m pretty excited about your plugin and want to maximize the effect.

    Thanks for all your help Frank!

    Regards,
    Carl

    Plugin Author Frank Goossens

    (@futtta)

    so, for (1); maxcdn would work as it is a pull-type CDN, cloudflare would not.

    (2); best to be used if you have background images that are present on each & every page

    (3); correct, AO needs to regenerated it’s cache, which indeed means you take a small hit for every autoptimized file not in cache. navigating around the site would definitively help.

    kind regards,
    frank

    Thread Starter BackpackersUnion

    (@backpackersunion)

    You rock!

    Thanks for all your help and the great work on AO!

    All the best,
    Carl

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Javascript Libraries?’ is closed to new replies.