1

Currently my website has cache controls set for javascript libraries and images, and caches them for one week. I'd like to know what best practices I should following leading up to my websites relaunch in a week. All images, javascript, css files will be replaced.

A couple of strategies I'm considering:

  1. Change the ExpiresByType to one hour for the next week, to ensure returning visitors wont have slower speeds, and then 1.5 hrs before launch, change the cache control to zero.

  2. Change the ExpiresByType to zero until launch.

  3. Remove all cache controls from the htaccess until launch, and let the browsers handle caching.

Any thoughts on the above strategies or things I haven't considered? Thanks

This is my root .htaccess. Applies to images and javasript libraries:

ExpiresActive on
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"

This resides in another sub-directory from the root. Overides the above controls and resets to zero for my custom javascript files

ExpiresActive on
ExpiresByType text/javascript "access plus 0 seconds"
ExpiresByType application/x-javascript "access plus 0 seconds"
ExpiresByType application/javascript "access plus 0 seconds"

1 Answer 1

-1

cache and server(s) location of assets is delivery speed - decentralize assets and use cloud related cache will allow for near simultaneous requests as the requests are fed by multiple sites.

IMHO, Centralizing assets on a single server is a failed concept.

1
  • If your concern is cache policies, consider a map related to need for updates. example taxonomy: Logos, trademarks, corporate identity are rarely undated. Other images are frequently changed requiring a cache refresh of only these assets.
    – Testbench
    Feb 18, 2015 at 21:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .