Hot answers tagged

2

A simple if ought to be sufficient here: server { location ... { if ($http_referer ~* ^https://example.com/backoffice) { expires epoch; } } } Keep in mind that in general it is vastly preferable for your web application to make caching decisions and respond with the appropriate directives.


1

Since the HTTP Response caching headers specify a Max-Age of 86400 seconds (one day), the browsers will fetch the images when they expire. You need to increase the Max-Age to get them cached indefinitely.


Only top voted, non community-wiki answers of a minimum length are eligible