Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
Content-Type:application/x-javascript; charset=utf-8
Date:Tue, 11 Sep 2012 08:39:05 GMT
Expires:Wed, 12 Sep 2012 08:39:05 GMT
Last-Modified:Tue, 11 Sep 2012 06:22:41 GMT

Why is nginx sending 2 Cache-Control entries, could this be a problem for the clients?

share|improve this question
What is the rest of the detail of your server setup? – Michael Hampton Sep 11 '12 at 8:53
I guess i found my answer: – optixx Sep 11 '12 at 8:56
up vote 5 down vote accepted

Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]. It MUST be possible to combine the multiple header fields into one "field-name: field-value" pair, without changing the semantics of the message, by appending each subsequent field-value to the first, each separated by a comma. The order in which header fields with the same field-name are received is therefore significant to the interpretation of the combined field value, and thus a proxy MUST NOT change the order of these field values when a message is forwarded.

share|improve this answer
Mark as correct please. – 3molo Sep 11 '12 at 8:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.