Caching is killing me

Status
Not open for further replies.

akesox10

Member
Prime Account
Messages
45
Reaction score
2
Points
8
I make css edits and can see the updates aren't reflected in the active stylesheet...for a long time. Eventually they show up but it makes working on a site nearly impossible. I'm all in favor of caching but not if I can't turn it off. Is it going to stay this way or can we expect an improvement?
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
Add the following to the htaccess in the folder you wish to disable caching in.

Code:
Header set Cache-Control "max-age=0, private, no-cache, no-store, must-revalidate"
 

akesox10

Member
Prime Account
Messages
45
Reaction score
2
Points
8
Thanks. Tried it in the root htaccess and the theme folder but it doesn't seem to make any difference.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
Thanks. Tried it in the root htaccess and the theme folder but it doesn't seem to make any difference.
it is in my [ public_html ] folder - and made no change for me
 

akesox10

Member
Prime Account
Messages
45
Reaction score
2
Points
8
This finally did the trick for me - added to .htaccess at root (public_html):
<filesMatch "\.(html|htm|js|css)$">
FileETag None
<ifModule mod_headers.c>
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</ifModule>
</filesMatch>
 
Status
Not open for further replies.
Top