Forum Discussion
MichaelGraham2
8 years agoQrew Assistant Captain
Hi Dan
This is my code for the reg.html but I cant get it to activate the service worker?
I installed the Service Worker Detector.
sw3.js and sw4.js are copies of your code with my dbids.
Can you think of what I may be missing?
This is my code for the reg.html but I cant get it to activate the service worker?
I installed the Service Worker Detector.
sw3.js and sw4.js are copies of your code with my dbids.
Can you think of what I may be missing?
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Service Worker Registration Page</title> </head> <body> <script> var dbid = "bjgfg9j2v"; var dbidTable1 = "bjgfg9j4u"; var dbidTable2 = "bkw7ji6y9"; var dbidTable3 = "bmegt73fb"; var dbidTable4 = "bmtwwihdt"; var apptoken = "bi3u4amckdsz9xcqe3ehdbcwxty"; if ("serviceWorker" in navigator) { navigator.serviceWorker.register(dbid + "?a=dbpage&pagename=sw3.js", {scope: dbidTable1}); navigator.serviceWorker.register(dbid + "?a=dbpage&pagename=sw4.js", {scope: dbidTable3}); } </script> </body> </html>
_anomDiebolt_
8 years agoQrew Elite
This is a JavaScript syntax error. The use of the word token is not referring to your application token - it is referring to JavaScript's attempt to parse some expression it does not understand.
Service Workers are supported by evergreen Chrome, FireFox and Opera not IE or Edge. Microsoft made an announcement they are developing Service Workers for Edge but they are just tardy:
https://blogs.windows.com/msedgedev/2016/05/24/fetch-and-xhr-limitations/
https://developer.microsoft.com/en-us/microsoft-edge/platform/status/serviceworker/
What browser are you using?
Service Workers are supported by evergreen Chrome, FireFox and Opera not IE or Edge. Microsoft made an announcement they are developing Service Workers for Edge but they are just tardy:
https://blogs.windows.com/msedgedev/2016/05/24/fetch-and-xhr-limitations/
https://developer.microsoft.com/en-us/microsoft-edge/platform/status/serviceworker/
What browser are you using?