Jump to content
Sign in to follow this  
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...