Was wondering is this possible in .htaccess?
I’m currently caching .js, .css and all image files via PHP (and providing the cached only if the file has not been modified by checking the filemtime()).
However someone suggested it’s possible via .htaccess and much faster, so was hoping maybe someone can shed some light…I’ve looked around and found various snippets but none which cover what I’m after.
If you’ve got mod_expires installed on your apache server you can put something like this in your
.htaccessfile. This example is PHP orientated (actually grabbed from the Drupal 7.htaccessfile) but should serve as a good starting point.