Jump to content

Archived

This topic is now archived and is closed to further replies.

keat

.htaccess caching breaks basket

Recommended Posts

I found an issue where my basket fails to update when adding additional items.

Removing a few cache lines from .htaccess and the fault seems to go away.

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 day"
ExpiresByType image/jpeg "access 1 day"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 day"
ExpiresByType application/pdf "access 1 day"
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>
## EXPIRES CACHING ##

 

Any ideas which line would cause this.

Share this post


Link to post
Share on other sites

I'd change;

ExpiresByType text/html "access 1 day"

to;

ExpiresByType text/html "access 0 seconds"

 

Share this post


Link to post
Share on other sites

That makes sense, it must have been like this for a while.

Strange how no one has mentioned it until today and then I get two phone calls in the space of 20 minutes.

Share this post


Link to post
Share on other sites

I agree with @Al Brookbanks and this causes a lot of issues with people blindly following recommendations on certain page speed sites. The other one I would be careful of is the CSS one !

Ian

Share this post


Link to post
Share on other sites
29 minutes ago, keat said:

That makes sense, it must have been like this for a while.

Strange how no one has mentioned it until today and then I get two phone calls in the space of 20 minutes.

Hosts can make these changes without letting their clients know. The more the browser caches and for longer the less hits on the server. ;)

Share this post


Link to post
Share on other sites

It was on my own server, so It will have been me who applied it.

Looking in my backups, it was apparent going back to at least two weeks.

 

Share this post


Link to post
Share on other sites

×
×
  • Create New...