covidwatchorg / portal

Covid Watch Portal web app for diagnosis verification
Apache License 2.0
8 stars 3 forks source link

Use Cache-Control in the HTTP headers (or use http-equiv in the HTML) to make screen short-lived on staging #444

Closed ibeckermayer closed 4 years ago

ibeckermayer commented 4 years ago

For example (seconds, so 10 minutes)

Cache-Control: max-age=600

This way users won't typically need to remember to hard-refresh in order to get the updated version of the app

jcolla-holla commented 4 years ago

So after some testing, this actually doesn't appear to be an issue. After merging a PR into our staging branch dev and then loading the staging site (which I've loaded many times in this browser and has at least some cached images, etc), the version of the site that loaded included the PR code.

This video shows this. Skip ahead to 3:10 to see this (no audio on this video)

Note: currently the cache-control apparently is set to no-cache. I'm not an expert in this but it seems to be ok for our desired result. More in docs here

Screen Shot 2020-08-07 at 7 47 52 PM