I am using nginx for my webserver. I am trying to set an expiry date or a maximum age in the HTTP headers for static resources but it doesnt work. This is what i am using;
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 31536000s;
add_header Pragma "public";
add_header Cache-Control "max-age=31536000, public, must-revalidate, proxy-revalidate";
add_header X-Powered-By "blablabla";
log_not_found off;
}
What i am doing wrong? Google pagespeed still warn me to use Leverage browser caching.
Date: Wed, 30 Nov 2011 14:53:52 GMT Server: libwww-perl-daemon/5.827 Connection: close Date: Wed, 30 Nov 2011 14:53:52 GMT Server: nginx Vary: Accept-Encoding Vary: Cookie Content-Length: 48895 Content-Type: text/html; charset=UTF-8and there is no overriding. – borannb Nov 30 '11 at 15:02