Closed greatfire-martin closed 9 years ago
Attempting a fix to this by including the hash as a query parameter to the app cache file. If the hash sent from the cached page does not match the hash of the app cache file, the app cache file will output a timestamp to force an update. This should make the browser attempt to load a new version until it gets one which matches the app cache file.
Seems to be working
The .appcache file is served with a "Cache-Control: max-age=0" header so that browsers will always check whether there's a newer version. The .appcache file contains an md5 hash in a comment which is generated based on the file contents in the RWB directory. The effect should be that whenever RWB code or data changes, browsers update their app cache. However, there's a problem. The cached page is itself cached by the CDN. This means that in some instances the browser will reload the application cache but will replace it with a cached version (at the CDN level) of the older page. When the CDN version is replaced, the application cache no longer will refresh it.
Thinking about solutions..