What does `expires -1` mean in NGINX` location` directive?
For the example location
below, what does it mean -1
for expires
? Does this mean "never expires" or "never cached"?
# cache.appcache, your document html and data
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires -1;
access_log logs/static.log;
}
https://github.com/h5bp/server-configs-nginx/blob/master/h5bp/location/expires.conf
source to share
According nginx could manual , the directive adds HTTP-header Expires
and Cache-Control
back.
The value -1
means that these headers are specified as:
Expires:
current time minus 1 second
Cache-Control: no-cache
So, in short, it instructs the browser not to cache the document.
source to share