Skip to content

Node.js based forum software built for the modern web

fix: do not register SW for Safari until upstream fixes #9193

gasovedce5fea2abd73
diff --git a/public/src/app.js b/public/src/app.js
index aa3e9f6088..92c3acf4aa 100644
--- a/public/src/app.js
+++ b/public/src/app.js
@@ -799,7 +799,8 @@ app.cacheBuster = null;
};
function registerServiceWorker() {
- if ('serviceWorker' in navigator) {
+ // Do not register for Safari browsers
+ if (!ajaxify.data._locals.useragent.isSafari && 'serviceWorker' in navigator) {
navigator.serviceWorker.register(config.relative_path + '/service-worker.js', { scope: config.relative_path + '/' })
.then(function () {
console.info('ServiceWorker registration succeeded.');