2👍
✅
This adds two HTTP headers to the responses (Expires
and Cache-Control
). Those headers are used by the browsers to cache content, avoid doing the same requests for static content each time a page is loaded.
expires 30d
means that all content in static and media folders will be cached by browsers during 30 days, but nothing will be deleted and you won’t need to regenerate anything in the server.
expires max
set the Expires
header to the value “Thu, 31 Dec 2037 23:55:55 GMT”, and the Cache-Control
to 10 years.
See the nginx documentation for more details: http://nginx.org/en/docs/http/ngx_http_headers_module.html
For more info about HTTP caching see http://www.mobify.com/blog/beginners-guide-to-http-cache-headers/
Source:stackexchange.com