diff --git a/www/js/app.js b/www/js/app.js index b8584fce..58da2fb2 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -1115,6 +1115,11 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'cache', 'images', 'sett this.checked = false; document.getElementById('serviceworkerModeRadio').checked = true; return; + } else if (this.value === 'serviceworker' && params.zimType === 'zimit') { + cache.clear('all', refreshAPIStatus); + uiUtil.systemAlert('We need to clear the assets cache when switching to Service Worker mode ' + + 'while using a Zimit ZIM, to be sure you are served the correct assets.
' + + 'N.B. You may also need to re-pick the ZIM.', 'Clearing cache...') } var returnDivs = document.getElementsByClassName("returntoArticle"); for (var i = 0; i < returnDivs.length; i++) {