We use expires max
to keep static files cached in the browser as long as possible. When we redeploy I'd like to force the user's browser to dump its cached files. Is there a way do this with nginx?
We use expires max
to keep static files cached in the browser as long as possible. When we redeploy I'd like to force the user's browser to dump its cached files. Is there a way do this with nginx?
Do not use
expires max
because of RFC 2616 sec14.21 where it is clearly stated that:But this only on a side node. You have two options:
The later is often reported as problematic by various tools because the old default configuration of the popular Squid proxy server was to not cache resources with query strings [ ref1, ref2 ]. This is a problem of the past and I honestly hope that all proxy admins have updated their Squid proxy since 2008.
Go for the query string and simply include the file modification time.