Autoptimize; JavaScript in head and some deprecated functionality

Autoptimize 1.6.5 got just pushed out, with one new feature and one notification. The new option configures Autoptimize to output the aggregated JavaScript in the head-section instead of at the bottom of the HTML. This can be useful when some of the JavaScript needs to be loaded asap and might prove useful to make jQuery plugins behave.
The notification might be less welcome for some users; YUI compression and the CDN options are marked as deprecated in this release. YUI compression was pretty exotic and required the installation of JAVA and the YUI compression jar, so I doubt anyone was actually using this. CDN options are deprecated as well; some people reported issue that I could not reproduce or fix. As I consider CDN not to be core functionality and as it can better be accomplished using e.g. WP Super Cache (which is a must-have companion of Autoptimize anyhow), CDN will indeed also be removed from Autoptimize. Expect the deprecated parts to be removed in 1.7.0 (which isn’t planned yet).

9 thoughts on “Autoptimize; JavaScript in head and some deprecated functionality”

  1. Hey nice keeping up with this, I’ve been an old fan of Autoptimizer. This update fixed up the problem I had with javascript in the head. Well done. ONE thing that bugs me a little, if it would be possible to put the autoptimized css link BELOW the head title in the headers.. Post title
    Thanks and best regards.

    • Glad the javascript-head issue got solved for you DJ White Hawk. Never thought about the position of CSS actually, but I am curious why you would like it after the title-element. What is the disadvantage of having it (CSS) before it (title)?

  2. Hey, great plugin, thanks a lot for making it.
    I respect your decision to pull the CDN functionality from the plugin, however I don’t see a way of getting WP Super Cache to actually serve my Autoptimize’d CSS/JS.
    Is there a link somewhere explaining how to do that?
    I am using origin pull with a CNAME and it’s working great for media content, but I can’t get those pesky CSS/JS files to be served via the CDN.
    Thanks, LB

    • I’m on WP Super Cache and a pull CDN as well, no problem to offload JS/CSS. Settings are pretty straightforward; enable CDN, define off-site URL, define wp-content and wp-includes as included directories and that’s it, really.

      • Hi Frank, thank you for the feedback.
        I have that already, and for images etc. it works.
        But isn’t it because that Autoptimize (or WP Super Cache, not sure) suffixes my optimized JS/CSS with ‘.php’ and because ‘.php’ is set to be excluded under the CDN settings in WP Super Cache?
        For now I have disabled the CDN functionality in WP Super Cache which seemed to fix my problems.
        Thanks, LB

  3. Right, ok 🙂 I thought that you sort of “had to” have this enabled or unless your site wouldn’t work at all.
    I have now tried removing ‘.php’ and am waiting for Cloud Front to catch up.
    Thanks, LB

  4. I recently downloaded Autoptimize to give it a try. I use Beacon Ads and when I select “Optimize JavaScript Code” those ads disappear.
    Any ideas?
    BTW, this is the only caching plugin I’m using. Instead of adding another I’ve modified the htaccess file. Though I may give WP Super Cache a try.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.