Opened 6 years ago

Closed 6 years ago

#1776 closed bug (fixed)

Javascript changes need browser cache clearing

Reported by: planetcruiser Owned by: planetcruiser
Priority: major Milestone: 1.2
Component: BW Group Keywords:
Cc:

Description (last modified by planetcruiser)

Issue:

  • If main.js includes new files, e.g. now for the OSM release, on some aggressively caching browsers a hard reload (hold shift or ctrl while reloading) is needed
  • Non technical users will think the site is simply broken

Expected behaviour:

  • New JS is loaded when page is reloaded

Solution:

  1. Identify which JS files are aggressively cached
  2. Add a bogus "?1" query string or similar at the end of JS includes to bypass browser cache
  3. Change (increment) query string whenever JS file changes and needs to be reloaded again

Notes:

  • main.js may need to be modified to pass on query string to included JS files
  • Instead of a number in the query string the current Git revision number could be used, which would result in cache expiry for each revision - this is a bit of an overkill

Related ticket:

Change History (4)

comment:1 Changed 6 years ago by toub

I can take the ticket if nobody else, but probably not able to fix it before 2/3 days.

comment:2 Changed 6 years ago by planetcruiser

  • Owner set to planetcruiser
  • Status changed from new to accepted

i will look into this one now

comment:3 Changed 6 years ago by planetcruiser

  • Description modified (diff)

added related ticket:

comment:4 Changed 6 years ago by planetcruiser

  • Resolution set to fixed
  • Status changed from accepted to closed

this one is difficult to test on alpha at this point, because we would need to deploy the state of master to alpha first, then load it with a browser, deploy latest git, load with the same browser. so, after good local testing i am confident this fix will do:

https://gitorious.org/bewelcome/rox/commit/201bb827e1ba1c066e03297e5d998d3032e81560

let's pay extra attention to this when releasing 1.2

Note: See TracTickets for help on using tickets.