Every C2 games I made, when I load it and I get error console:
Uncaught (in promise) DOMException: Failed to register a ServiceWorker: A bad HTTP response code (403) was received when fetching the script.
It's related to sw.js file
Anyone know can explain it and how to prevent it?
I'm using Chrome.
I think that's what happens if you host on HTTP, not HTTPS. You can ignore it though, the service worker does nothing and exists only for the "add to homescreen" banner in Chrome for Android (which requires https).
Ashley it happens in HTTPS
https://dl.dropboxusercontent.com/u/762 ... index.html check for console.
Ok I ignore this at moment. Thanks.
Develop games in your browser. Powerful, performant & highly capable.
Hmm, the error is kind of mysterious, Chrome doesn't seem to indicate why it's not working. If it doesn't happen with other servers I'd guess it's to do with Dropbox's server configuration, but I don't know what. The only consequence would be it disables the Chrome 'Add to homescreen' banner on Android, so unless you're desperate for that, you can ignore it.