[Pro] Browser caching

Is there a smart way to do it? If yes, how?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

What type of content are you trying to cache? Your Web server will automatically send the correct headers to allow the browser to cache static resources like photos or CSS sheets (or the HTML page itself). There’s really nothing for you to configure there.

Walter

On Sep 4, 2012, at 11:45 AM, TomP wrote:

Is there a smart way to do it? If yes, how?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I made the page speed test. Result is good but obviously it requires brower caching and script compression. I thought I could do the browser caching via htaccess but it did not work…

ExpiresActive On ExpiresDefault "access plus 1 month 1 days" ExpiresByType text/html "access plus 1 month 1 days" ExpiresByType image/gif "access plus 1 month 1 days" ExpiresByType image/jpeg "access plus 1 month 1 days" ExpiresByType image/png "access plus 1 month 1 days" ExpiresByType text/css "access plus 1 month 1 days" ExpiresByType text/javascript "access plus 1 month 1 week" ExpiresByType application/x-javascript "access plus 1 month 1 days" ExpiresByType text/xml "access plus 1 seconds"

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

All of these settings should be done at the server config level. By the time you reach .htaccess, the damage is done, I think. I would leave these alone, anyway, as you might fight with the Apache configuration – remember your hosting provider will have tuned their httpd.conf for their actual hardware and expected loads.

If you have access to your DNS settings, then what I would recommend is that you sign up for a free CloudFlare account, and configure CF as a cache layer over your application. It’s completely transparent to your users, and automatically sets everything up to be the lowest-drag possible. They also gzip-compress your assets transparently, too. Don’t try to do any of this on Apache unless you own the server (root access).

Walter

On Sep 4, 2012, at 12:29 PM, TomP wrote:

I made the page speed test. Result is good but obviously it requires brower caching and script compression. I thought I could do the browser caching via htaccess but it did not work…

ExpiresActive On ExpiresDefault "access plus 1 month 1 days" ExpiresByType text/html "access plus 1 month 1 days" ExpiresByType image/gif "access plus 1 month 1 days" ExpiresByType image/jpeg "access plus 1 month 1 days" ExpiresByType image/png "access plus 1 month 1 days" ExpiresByType text/css "access plus 1 month 1 days" ExpiresByType text/javascript "access plus 1 month 1 week" ExpiresByType application/x-javascript "access plus 1 month 1 days" ExpiresByType text/xml "access plus 1 seconds"

freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thank you Walt! I left it that way as it was.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options