Hi,
I'm trying to prevent .js files to be cached, but it looks like there's no way to achieve it... I've (also) added this to the .htaccess file:
<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 2084 05:00:00 GMT"
</ifModule>
</filesMatch>
(also tried with expiration in 1984). it doesn't work.
curl -I [the-url] gives me this:
HTTP/1.1 200 OK
Date: Tue, 19 Mar 2019 18:33:32 GMT
Last-Modified: Tue, 19 Mar 2019 17:59:01 GMT
Cache-Control: max-age=0, no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Content-Type: application/javascript
Vary: Accept-Encoding
X-Varnish: 1033175201 1029244154
Age: 1154
X-Cache: HIT
X-Cache-Hits: 8
Accept-Ranges: bytes
Connection: keep-alive
It looks like cache is still working, despite the Cache-control.
I think it's set to some minutes...can you please help me to disable it?
Working on a .js file, I'm editing it every few seconds...
I have a free hosting.
Thank you very much
I'm trying to prevent .js files to be cached, but it looks like there's no way to achieve it... I've (also) added this to the .htaccess file:
<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 2084 05:00:00 GMT"
</ifModule>
</filesMatch>
(also tried with expiration in 1984). it doesn't work.
curl -I [the-url] gives me this:
HTTP/1.1 200 OK
Date: Tue, 19 Mar 2019 18:33:32 GMT
Last-Modified: Tue, 19 Mar 2019 17:59:01 GMT
Cache-Control: max-age=0, no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Content-Type: application/javascript
Vary: Accept-Encoding
X-Varnish: 1033175201 1029244154
Age: 1154
X-Cache: HIT
X-Cache-Hits: 8
Accept-Ranges: bytes
Connection: keep-alive
It looks like cache is still working, despite the Cache-control.
I think it's set to some minutes...can you please help me to disable it?
Working on a .js file, I'm editing it every few seconds...
I have a free hosting.
Thank you very much