Reputation: 195
The Cache and ETag thing is driving me insane.
If I change a page and go to it on the browser, the changes I've made aren't there. I have to refresh to see them. That can't be normal. I could have a visitor coming back to my main page and the new article entries not reflecting.
I already tried unsetting the ETags and all that as well.
What can I do so that the contents are indeed cached, but if they have changed since they were saved, the updated version will show?
The YSlow test also gives me this warning: Misconfigured ETags. Which also happens if my htaccess is empty. That suggests it's my host's problem, but the same happens to both of my sites, hosted differently.
This is how my .htaccess looks:
AddDefaultCharset UTF-8
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^mypage.com [nc]
rewriterule ^(.*)$ http://www.mypage.com/$1 [r=301,nc]
ServerSignature Off
Options -Indexes
ExpiresActive On
ExpiresDefault A606990
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
ExpiresDefault A606990
</FilesMatch>
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
ExpiresDefault A606990
</FilesMatch>
<FilesMatch "\.(txt|js|css)$">
ExpiresDefault A606990
</FilesMatch>
<FilesMatch "\.(xml)$">
ExpiresDefault A86412
</FilesMatch>
PLEASE someone give me a hand, I've read plenty of articles on this subject but nothing seems to work.
Upvotes: 0
Views: 254
Reputation: 195
Ok, I got a solution, hope it helps someone. It was just about ExpiresDefault to A0 for the type of file you want to show any changes without having to refresh.
Upvotes: 0
Reputation: 9762
If your using apache
it looks like you may not have your ETag configuration set properly. Have a look at the ETag
Property in apache
You'll probably want something like
FileETag MTime Size
In your config, now however that any content generated using mod_include
will not have Etags
generated for them!
Upvotes: 1