Odoo16: Safari can not open the page (WebKitServiceWorker:0)
I have migrated to Odoo16. With browsers like Firefox and Chrome, all website pages are ok.
But using Safari, when i go to this specific page https://www\.samadeva\.com/event,\ i\ get\ this\ error:
Safari\ can\ not\ open\ the\ page\ «\ https://www.samadeva.com/event Error : . FetchEvent.respondWith received an error: NotSupportedError: The operation is not supported.. (WebKitServiceWorker:0)
When i open a private window or empty cache, i get the page successfully rendered. So far, i thought i have solved the problem...
But after a while, website's visitors report that the same issue occurs again...
Any idea?
Cette erreur de Safari a aussi était rencontrée et résolue avec Angular : https://github.com/angular/angular/issues/50378
I have tried to inject this js workaround inside the head-tags of my websites using in odoo16: Editor > Modify > Theme > head ...:
if (navigator.userAgent.includes("Version/17.0") || navigator.userAgent.includes("Version/17.1")) {
navigator.serviceWorker.getRegistrations().then(function (registrations) {
for (let registration of registrations) {
registration.unregister();
}
});
}
which works on the first call, but when clicking on another page, the error append again.