Skip to content

Offline mode - Service workers #813

Open
@hellonearthis

Description

@hellonearthis

I've just been trying to add a service worker to try and make a PWA in the P5js Editor.
https://editor.p5js.org/hellonearthisman/sketches/fwp_5jja3 has the code to setup the service worker. I tried putting the code in the index.html and in the sketch setup.
I get this error (seen in console in present mode https://editor.p5js.org/hellonearthisman/present/fwp_5jja3 )

Service worker registration failed: TypeError: Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script.

Any tips on how to get this to work or why it won't work are welcome.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions