smallAreaHealthStatisticsUnit / rapidInquiryFacility

The Rapid Inquiry Facility (RIF) helps epidemiologists and public health researchers in environmental health activities.
GNU Lesser General Public License v3.0
14 stars 5 forks source link

RIF WAR updates not applied because your browser cache needs to be emptied #137

Open peterhambly opened 5 years ago

peterhambly commented 5 years ago

Angular works by instantiating code fragments at run time so on load from the browsers viewpoint it is just index.html plus a small mountain of Javascript. Crucially all the modal windows are fragments fn HTML (called partials) that are added and removed as required. This causes some browsers to fail to detect changes - especially in partials.

If this is the case then we need to set cache expires in the REST header to one of:

  1. now
  2. the start time of tomcat

We obviously don't know when RIF40.war needs to be upgraded, so cache-expires should not be set to a future date. The increase in network traffic can be offset by minification.

This can be done in Angular (https://stackoverflow.com/questions/31450738/how-to-define-expiration-time-on-cache-in-angular-cachefactory), but may also need the Tomcat cache-expiry setup.