diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/offline.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/web/cobrands/fixmystreet/offline.js b/web/cobrands/fixmystreet/offline.js index 4d7c471aa..648375afd 100644 --- a/web/cobrands/fixmystreet/offline.js +++ b/web/cobrands/fixmystreet/offline.js @@ -411,9 +411,10 @@ if ($('#offline_list').length) { } fixmystreet.offlineBanner.make(true); } else { - // Put the appcache manifest in a page in an iframe so that HTML pages - // aren't cached (thanks to Jake Archibald for documenting this!) - if (window.applicationCache && window.localStorage) { + // If we're using appcache, not a service worker, put the appcache manifest + // in a page in an iframe so that HTML pages aren't cached + // (thanks to Jake Archibald for documenting this!) + if (!('serviceWorker' in navigator) && window.applicationCache && window.localStorage) { $(document.body).prepend('<iframe src="/offline/appcache" style="position:absolute;top:-999em;visibility:hidden"></iframe>'); } |