So I've this response header for static files on my nginx server.
Cache-Control:max-age=2592000
Connection:keep-alive
Date:Sat, 11 Dec 2010 22:28:13 GMT
Expires:Mon, 10 Jan 2011 22:28:13 GMT
Last-Modified:Sat, 11 Dec 2010 22:11:35 GMT
Server:nginx/0.6.32
I think of removing the server signature to reduce the response size. What should I add in my server configuration to make the browser to use files not even making a request to server and overall make it as efficient as possible? Currently I could get the js on server this fast: http://i55.tinypic.com/orrons.png
Edit: I know added this property: add_header cache-control public; And the response headers are like this:
Cache-Control: max-age=31536000
Cache-Control: public
Because I've the expires 1y; set too. Is there a way to join them?
Also I checked facebook javascript file responses and they use these techniques:
HTTP/1.1 200 OK
Content-Type: application/x-javascript; charset=utf-8
Last-Modified: Sat, 01 Jan 2000 00:00:00 GMT
Pragma:
Content-Encoding: gzip
X-Cnection: close
Content-Length: 11724
Vary: Accept-Encoding
Cache-Control: public, max-age=31239788
Expires: Thu, 08 Dec 2011 23:43:19 GMT
Date: Sun, 12 Dec 2010 10:00:11 GMT
Connection: keep-alive
What did the Vary property do? I think I will apply the last-modified for years ago as they did.