roles/nginx: Adjust Cache-Control headers

Use "public" with "max-age" instead of Expires, as "max-age" is always
preferred if it's present.  Note: setting "public" doesn't make the
resource "more cacheable", but it is just more explicit.

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
2014-11-07 00:29:53 +03:00
parent b71269e6cb
commit c870044584
2 changed files with 24 additions and 3 deletions

View File

@ -6,8 +6,7 @@
}
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 7d;
add_header Cache-Control "must-revalidate";
add_header Cache-Control "public, max-age=604800";
}
# Add trailing slash to */wp-admin requests.