diff --git a/config/webpack.js b/config/webpack.js
index 536185b809..80db09afc3 100644
--- a/config/webpack.js
+++ b/config/webpack.js
@@ -264,7 +264,7 @@ module.exports = (env) => {
'return.html',
],
// swSrc: './src/sw.js',
- swDest: './dist/sw.js'
+ swDest: './dist/service-worker.js'
}));
}
diff --git a/src/.htaccess b/src/.htaccess
index 099d377e74..35299620f2 100644
--- a/src/.htaccess
+++ b/src/.htaccess
@@ -958,3 +958,15 @@ FileETag None
+
+# Do not cache the service worker!
+
+
+ FileETag None
+
+ Header unset ETag
+ Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
+ Header set Pragma "no-cache"
+ Header unset Expires
+
+
\ No newline at end of file
diff --git a/src/index.html b/src/index.html
index 57ae039563..ac38c18957 100644
--- a/src/index.html
+++ b/src/index.html
@@ -34,7 +34,9 @@
-
+
+ DIM hasn't loaded. Something may be wrong with it, or with your browser (maybe you have a content blocker, or have disabled JavaScript). Try force reloading to make sure (Ctrl-F5 or Cmd-R).
+
Your browser is not supported by DIM. Some or all DIM functionality may not work. Please upgrade to a supported browser.
diff --git a/src/index.js b/src/index.js
index 302d431f48..cf7cad063a 100644
--- a/src/index.js
+++ b/src/index.js
@@ -33,7 +33,7 @@ require('./app/shell/dimManifestProgress.directive');
require('./scss/main.scss');
if ($DIM_FLAVOR !== 'dev' && navigator.serviceWorker) {
- navigator.serviceWorker.register('/sw.js')
+ navigator.serviceWorker.register('/service-worker.js')
.catch((err) => {
console.error('Unable to register service worker.', err);
});