Nginx Cache-Control
Posted
by
optixx
on Server Fault
See other posts from Server Fault
or by optixx
Published on 2012-09-11T08:52:15Z
Indexed on
2012/09/11
9:40 UTC
Read the original article
Hit count: 275
Iam serving my static content with ngnix.
location /static { alias /opt/static/blog/; access_log off; etags on; etag_hash on; etag_hash_method md5; expires 1d; add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; }
The resulting header looks like this:
Cache-Control:public, must-revalidate, proxy-revalidate Cache-Control:max-age=86400 Connection:close Content-Encoding:gzip Content-Type:application/x-javascript; charset=utf-8 Date:Tue, 11 Sep 2012 08:39:05 GMT Etag:e2266fb151337fc1996218fafcf3bcee Expires:Wed, 12 Sep 2012 08:39:05 GMT Last-Modified:Tue, 11 Sep 2012 06:22:41 GMT Pragma:public Server:nginx/1.2.2 Transfer-Encoding:chunked Vary:Accept-Encoding
Why is nginx sending 2 Cache-Control entries, could this be a problem for the clients?
© Server Fault or respective owner