processing / processing/p5.js-web-editor
Offline mode - Service workers
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 1.7k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 8
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure using the linked sketch and its present-mode URL, then inspect the browser console and the service-worker script request that returns 404. Determine what the editor must provide for service-worker registration to work in offline mode; done means the worker registers successfully without the 404.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100