I've been trying to speed up my site and various speed measuring sites have pointed out that my main priority should be to set the expires header on the served content to 'Leverage browser caching'. I thought I could do this by making use of mod_expires, but for some reason it's not working.
Also I've been advised to add 'Header append Vary: Accept-Encoding', because apparently some clients can't handle decryption (fair enough....?!). So I looked at adding that via mod_headers.
Both of those Apache modules are installed on my VPS but after testing with those page speed tools and double-checking the headers with a tool called rebot, http://redbot.org/, I can see it's not working.
What am I doing wrong?
Here's the htaccess script:
and here's the output from redbot:
HTTP/1.1 200 OK Server: nginx Date: Thu, 09 Jan 2014 12:35:02 GMT Content-Type: text/html; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Cache-Control: no-cache, max-age=0, must-revalidate, no-transform, max- age=300 Expires: Thu, 09 Jan 2014 12:40:02 GMT Content-Encoding: gzip
It also says 'This response is negotiated, but doesn't have an appropriate Vary header.' and critically: 'The max-age Cache-Control directive appears more than once.' - is something else inside Silverstripe or anything else setting that expiry time to 0?
tl;dr; Do I have to do anything special in SilverStripe to set an expiry time on files and/or content?
Any help, much appreciated.