Easter Bunny special: Autoptimize 1.6.0

Not sure if April Fools or the Easter Bunny are to blame, but Autoptimize 1.6.0 just got pushed out the gates.

The main new features:

  • You can now specify which JavaScript should not be Autoptimized. Just add the names (or part of the path) of the scripts in a comma-separated list and that JavaScript-file will remain untouched by Autoptimize.
  • Added support for ETag and LastModified (essentially for a better pagespeed score, as the files were already explicitly marked as cacheable for 1 year).
  • Autoptimizing for logged in users is enabled again.
  • Misc. bug fixes (see changelog)

As always; leave a reply on this post or create a new topic on the support forum if you encounter any problem.

10 thoughts on “Easter Bunny special: Autoptimize 1.6.0

  1. frank Post author

    Well, the April fools is on me, with a stupid bug (typo) in the code that checks for eTag & Last-Modified which caused the aggregated files to return nothing. Sorry for that, it should be fixed in 1.6.1 which I just pushed out.

    Reply
  2. Gavin

    Since 1.6.1 was installed, my theme no longer loads properly. Same settings as before, but now my site loads a plain html page. Disabling javascript and css optimisations fixes the problem. Same issue on all three sites, too.

    Reply
    1. frank Post author

      Hi Gavin! Sorry bout that.

      Could you open up wp-content/plugins/autoptimize/classes/autoptimizeBase.php and at the end of that replace function getpath($url) with this piece of (older) code?

      protected function getpath($url)
      {
      $path = str_replace(get_settings('home'),'',$url);
      if(preg_match('#^(https?|ftp)://#i',$path))
      {
      //External script (adsense, etc)
      return false;
      }
      $path = str_replace('//','/',ABSPATH.$path);
      return $path;
      }

      Looking forward to your feedback!

      Reply
    1. frank Post author

      Hi Gavin; Just pushed 1.6.2 out which has a bugfix for people who are not on Apache (such as you). Hope this indeed solves you problem!

      Reply
  3. Milind

    Hey Frank

    First of all thanks for updating this plugin.
    Not particularly it applies to Autoptimize (almost all minifying plugins do that), whenever I try to optimize CSS, suddenly all formatting is lost. Otherwise the plugin works neat.

    Reply
    1. frank Post author

      If almost all plugins have difficulties with your CSS, there might be a problem with your CSS, maybe? ;-)

      line 220; Parse Error *clear:both; (the asterix)
      line 535: Parse Error {*height: 0; (the asterix)
      line 542: Parse Error opacity=30) (“=” should be “:”)
      line 546: Parse Error *display: inline; (the asterix)

      hope this helps :-)

      frank

      Reply
      1. Milind

        May be you are right. But I tried: W3TC, WP Minify, Better WP Minify, Super Cache … opt either Minify or combine CSS and my site is gone. So much that now I am on the lookout for a plugin which has the least options.

        WordPress/blog users are not dignified coders. Getting a site up and running needs many efforts. Getting sandwiched between experts is the worst. Plugin coders give one explanation, theme publishers give other reason. We don’t know who is right. And to top, we need to listen to pagespeed parameters … and you have a mess out there.

      2. frank Post author

        I’m afraid that it indeed can be pretty messy for the average non-tech-savvy blog-owner with a combination of plugins and themes that don’t always play nice. That being said; given the fact that all CSS optimization plugins seem to fail on your theme and that the W3C CSS validator indeed found issues with the CSS, confirms that this is something your theme authors might want really should to look into?

  4. Milind

    There are multitude of problems. By the time you find out a bug, theme publishers already have moved on and have little time listening to our woes. So either you continue on what is available or look around for a new theme (provided you have spare time to learn, again …)
    Our frontend is PC, backend (that we don’t know about) is Linux, PHP, Javascript, html, … We have shared hosting so can’t shout more often.
    W3TC suggests using a subdomain as a CDN, but then it fails to cache files on that new location. Why suggest something that doesn’t work? I had 40 pics, shifted to cdn.domain.com, means parallel downloads … but not even a fractional improvement.
    Anyway, I feel proud I introduced “Autoptimize” at the forum on byobwebsite.com well around a year ago … and now is the time to use it for myself. Cheers :-)

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *