Support » Plugin: Autoptimize » Have I got this right? Anything else I can do?

  • Resolved David Mottershead



    First of all I’d like to say thanks for a great plugin. Just installed it and it seems to be working well.

    I running it along with WP Super Cache.

    I’ve basically got the following settings checked:

    Optimise HTML
    Keep HTML Comments
    Optimise CSS
    Look for Styles in Head (so as not to move Google Adsense responsive css)

    I left the Javascript off as there’s a lot of Google Maps scripts loading elsewhere on the site and it seemed to affect them.

    I’m pretty happy with the results. The site is

    It got 92/100 on Pingdom:!/c5MKGH/

    And 89 on Page Speed, 90 on YSlow

    I’d just like a second opinion on what I added to the .htaccess file to get these scores. I got the code from searching around the web and to be perfectly honest don’t understand it. Just need to confirm I’ve not done anything silly.

    This is what I added:

    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg “access 1 year”
    ExpiresByType image/jpeg “access 1 year”
    ExpiresByType image/gif “access 1 year”
    ExpiresByType image/png “access 1 year”
    ExpiresByType text/css “access 1 month”
    ExpiresByType text/html “access 1 month”
    ExpiresByType application/pdf “access 1 month”
    ExpiresByType text/x-javascript “access 1 month”
    ExpiresByType application/x-shockwave-flash “access 1 month”
    ExpiresByType image/x-icon “access 1 year”
    ExpiresDefault “access 1 month”

    <IfModule mod_headers.c>
    <FilesMatch “\.(js|css|xml|gz)$”>
    Header append Vary: Accept-Encoding

    # disable etags

    FileETag none

    Is this ok? Is there anything else I can do that is easy to implement? Quite happy though, just want to make sure I’ve not done anything daft.

    Thanks in advance


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


    not bad david!

    don’t see any quick wins, but you could off course always try to optimize javascript, forcing script in head and excluding the Gmaps scripts (and jquery.js)? But optimizing javascript can indeed be somewhat difficult, requiring trial and error.

    Thanks for the response.

    So the htaccess code is ok? It doesn’t conflict with anything in the plugin or anything else bad?

    Plugin Author Frank Goossens


    The htaccess code is OK indeed, although (for css & js) it is only important if you have checked the option “Save aggregated script/css as static files?”. In which case it would make sense to also enable compression (mod_gzip or mod_deflate) for CSS & JS.

    But by default the aggregated js/css is served by a php-file (so non-static) which takes care of compression, expiry & accept-encoding & the works.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Have I got this right? Anything else I can do?’ is closed to new replies.