Jump to content

Best way to cache files ?


Recommended Posts

Hi,

what is the best way to set the caching times for filetypes in PS ?

 

I have amended the htaccess caching times to this:

 

<IfModule mod_expires.c>
 ExpiresActive On
 ExpiresByType image/gif "access plus 1 day"
 ExpiresByType image/jpeg "access plus 1 week"
 ExpiresByType image/png "access plus 1 day"
 ExpiresByType text/css "access plus 1 day"
 ExpiresByType text/javascript "access plus 60 mins"
 ExpiresByType text/html "access plus 1 day"
 ExpiresByType application/javascript "access plus 60 mins"
 ExpiresByType application/x-javascript "access plus 60 mins"
 ExpiresByType image/x-icon "access plus 1 week"
</IfModule>

 

But, I made an alteration last week to add a Christmas backdrop.

The computers that I use in the office didn't load this new backdrop until I forced a refresh.

This happens with all the css modifications I do.

 

 

This is making me think that customers are not seeing updated code and loosing customers.

 

Is there a better way to do this, or a way of checking to see if the Expires set in htaccess are working ?

 

Thanks

Link to comment
Share on other sites

Ok, so I remove the whole of the text above from the htaccess file, and the css alterations seem to appear immediately.

 

So... where is that code generated and inserted into the generated htaccess file ?

I want to change the Expiry length to be shorter, and if the htaccess file is generated again I want my changes to be used.

 

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...