Files will not update with Varnish off

Status
Not open for further replies.

ewzx10ho

New Member
Messages
5
Reaction score
0
Points
1
I am having caching issues with .js and .css files when trying to update them. I have varnish turned off through .htaccess as suggested by this forum in other posts. This is my .htaccess file:

Code:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on

<filesMatch "\.(html|htm|js|css|png|jpg|php|inc)$">
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>

When I upload replacement js and css files, it does not update on my website. Please help!
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi,

The first time you place these rules in the .htaccess file, you'll have to wait until Varnish next attempts to cache your site (since it only checks caching headers then). After that period, Varnish shouldn't cache files. ;)

Thank you,
 
Status
Not open for further replies.
Top