To speed up my website I have read about the Expires
header, how to implement it in Apache, and how to only do so for certain file types. However I want to set a one month expiry on all files except .php
files (webpages).
So how do I do this with .htaccess
? I have a PHP script that uses filemtime
to change the filename of CSS, JS files when they are edited, so that they are re-downloaded (eg if a file changes at xxxxxxx
in Unix time, it changes the filename to /resource.css?recache=xxxxxxxx
when it is requested). So that's taken care of. As images etc. don't change often, I want all of them to be cached for a month.
Also, what is the browser support for the Expires
header?