Don't use expire headers in doc examples
This commit is contained in:
parent
1cc4b14e51
commit
351e70671e
|
@ -31,7 +31,7 @@ statemtents, directives are defined like so:
|
||||||
# Make sure js files are served with a long expire
|
# Make sure js files are served with a long expire
|
||||||
location ~* \.js$ {
|
location ~* \.js$ {
|
||||||
add_header "section" "long expire"; # for illustration only
|
add_header "section" "long expire"; # for illustration only
|
||||||
expires 1y;
|
add_header Cache-Control "max-age=31536000";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Oh, and kill etags for js files
|
# Oh, and kill etags for js files
|
||||||
|
@ -54,7 +54,6 @@ Only ONE of these location blocks will be used:
|
||||||
Last-Modified: Tue, 29 Oct 2013 15:17:17 GMT
|
Last-Modified: Tue, 29 Oct 2013 15:17:17 GMT
|
||||||
Connection: keep-alive
|
Connection: keep-alive
|
||||||
ETag: "526fd17d-1"
|
ETag: "526fd17d-1"
|
||||||
Expires: Fri, 23 Oct 2015 09:58:47 GMT
|
|
||||||
Cache-Control: max-age=31536000
|
Cache-Control: max-age=31536000
|
||||||
section: long expire
|
section: long expire
|
||||||
Accept-Ranges: bytes
|
Accept-Ranges: bytes
|
||||||
|
@ -65,7 +64,7 @@ location block:
|
||||||
location ~* \.js$ {
|
location ~* \.js$ {
|
||||||
# Make sure js files are served with a long expire
|
# Make sure js files are served with a long expire
|
||||||
add_header "section" "long expire"; # for illustration only
|
add_header "section" "long expire"; # for illustration only
|
||||||
expires 1y;
|
add_header Cache-Control "max-age=31536000";
|
||||||
add_header "section" "no etags"; # for illustration only
|
add_header "section" "no etags"; # for illustration only
|
||||||
etag off;
|
etag off;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +79,6 @@ Which would then yield:
|
||||||
Content-Length: 1
|
Content-Length: 1
|
||||||
Last-Modified: Tue, 29 Oct 2013 15:17:17 GMT
|
Last-Modified: Tue, 29 Oct 2013 15:17:17 GMT
|
||||||
Connection: keep-alive
|
Connection: keep-alive
|
||||||
Expires: Fri, 23 Oct 2015 10:00:22 GMT
|
|
||||||
Cache-Control: max-age=31536000
|
Cache-Control: max-age=31536000
|
||||||
section: long expire
|
section: long expire
|
||||||
section: no etags
|
section: no etags
|
||||||
|
|
Loading…
Reference in New Issue