https://github.com/stephenlb/serviceworker-pubnub-example
Example using PubNub with ServiceWorkers
https://github.com/stephenlb/serviceworker-pubnub-example
docker pubnub serviceworker sharedworker webworker
Last synced: about 1 month ago
JSON representation
Example using PubNub with ServiceWorkers
- Host: GitHub
- URL: https://github.com/stephenlb/serviceworker-pubnub-example
- Owner: stephenlb
- Created: 2021-09-01T21:31:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-30T20:23:06.000Z (over 3 years ago)
- Last Synced: 2025-04-01T01:51:44.642Z (3 months ago)
- Topics: docker, pubnub, serviceworker, sharedworker, webworker
- Language: JavaScript
- Homepage: https://stephenlb.github.io/serviceworker-pubnub-example/
- Size: 289 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
This example shows how to use a single PubNub connection across many tabs and windows.
This is accomplished by using a Service Worker
`navigator.serviceWorker.register('service-worker.js');`.
This is great for reducing resources used for web apps.
This makes the end-user experience faster and more pleasant.`./start` to start the docker server.
### Service Workers Example
Service Workers are the W3C standard for sharing resources
between tabs/windows in a browser.```shell
open http://localhost:8000/index.html
```### Access Debugging for Service Worker
Open `chrome://inspect/#service-workers` in chrome.
Find the `localhost` section and click `inspect`.