• Hi,

    Could you implement, a htaccess based caching feature? Its a great plugin, but if you could extend the optimisation part with adding cache for js, css, png, jpg files and so on it would be great, rather then manually adding these entrys into the htaccess.

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

    (@optimizingmatters)

    not entirely sure I understand jvanderlinde; Autoptimize already caches the optimized JS/ CSS on one hand.

    On the other hand I don’t see any benefits in caching images, as those are served from the filesystem already.

    What AO does not have is page caching, so maybe you were thinking about that as well?

    Thread Starter Vanderlindemedia

    (@jvanderlinde)

    I often set manual rules in htaccess (apache) to cache certain files with a policy, now dont take this htaccess as a ruleset since the time to cache is way beyond any normal config:

    [code]
    # Caching

    <ifModule mod_headers.c>
    # Turn on Expires and set default expires to 3 days
    ExpiresActive On
    ExpiresDefault A253339200

    # Set up caching on media files for 1 month
    <filesMatch ".(ico|gif|jpg|jpeg|png|flv|pdf|swf|mov|mp3|wmv|ppt)$">
    ExpiresDefault A2419333200
    Header append Cache-Control "public"
    </filesMatch>

    # Set up 2 Hour caching on commonly updated files
    <filesMatch ".(xml|txt|html|js|css)$">
    ExpiresDefault A723343300
    Header append Cache-Control "private, must-revalidate"
    </filesMatch>

    # Force no caching for dynamic files
    <filesMatch ".(php|cgi|pl|htm)$">
    ExpiresDefault A333433333
    Header append Cache-Control "private, must-revalidate"
    </filesMatch>
    </ifModule>

    <IfModule mod_deflate.c>
    # these are known to be safe with MSIE 6
    AddOutputFilterByType DEFLATE text/html text/plain text/xml # everything else may cause problems with MSIE 6
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/x-javascript application/javascript
    AddOutputFilterByType DEFLATE application/ecmascript
    AddOutputFilterByType DEFLATE application/rss+xml
    </IfModule>
    [/code]

    But this should be integrated in a way in Autooptimize to have the one click benefits all settings. Same goes for ngix and any other webserver.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Ah OK, caching directives, now I understand. I’ll add it to the list of ideas for future consideration 🙂

    groeten uit België,
    frank

    Thread Starter Vanderlindemedia

    (@jvanderlinde)

    Yep, it should improve the score here and there with a few percent related to insights!

    Keep it up, excellent plugin.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Suggestion’ is closed to new replies.