ondemand
ondemand copied to clipboard
Configure NGINX to handle cache validation for static assets
We should configure NGINX to auto-handle HTTP cache validation of static assets it serves by adding the Last-Modified
based on the modification date of the file and handling cache validation requests e.g. https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching#Cache_validation.
See https://discourse.osc.edu/t/newby-question-how-to-link-an-external-css-file-to-an-app-in-ondemand/60/2 for a discussion about cache busting concerns.
You would know this is solved if:
- your app uses code that is mostly in static assets in public/ directory of the app
- your app does not employ any cache busting strategy for these assets
- you verify that you can make changes to these files and client browsers will fetch new versions of the files on future requests (also client browsers should be making cache validation requests when navigating to another page)
┆Issue is synchronized with this Asana task by Unito
reviewed, good idea eventually