Code: Select all
Header unset ETag
FileETag None
<FilesMatch "\.(ico|gif|jpg|jpeg|png|flv|pdf|mp3|wav|js|css)$">
Header unset Last-Modified
Header set Expires "Fri, 21 Dec 2012 00:00:00 GMT"
Header set Cache-Control "public, no-transform"
Header set Cache-Control "max-age=7257600"
</FilesMatch>
This is what I do to overcome it...? in a UDT named "fileTime"
Code: Select all
$files=$params['File'];
$fileTimeIS=filemtime($files);
echo $files."?".$fileTimeIS;
then I replace the file path in the tag. ie...
becomes
and I never have to go in the admin area just to change a file name across the bored. a 5 min task becomes 0. Great for more then CSS files and JS files, you can use it on images and what not too...
Note this is light weight for a reason... no math, no if's blaa blaa, you know... remember it checks the files each time and you should be using best practices on you CSS and JS construction so you don't have 5 CSS files and 5 JS files... etc...
Cheers
Jeremy