Domanda

Gidday

I've currently got js files set up as must-revalidate, to overcome mobile networks caching old versions when I do updates.

<FilesMatch ".(js)$">
Header set Cache-Control "max-age=608000"
Header set Cache-Control "must-revalidate"
</FilesMatch>

I have some .js files that I never change, so I was wondering how to go about making an exception for these files?

Thanks for your time and help.

È stato utile?

Soluzione

You can add another FilesMatch section for those specific files:

<FilesMatch "\.js$">
Header set Cache-Control "max-age=608000"
Header set Cache-Control "must-revalidate"
</FilesMatch>

# CACHED FOREVER
<FilesMatch "(file1|file2)\.js$">
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
Header unset Last-Modified
</FilesMatch>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top