You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SharedWorkers do not work. The code below appears to work in the fact that you get a worker, but parcel's adding of ?<timestamp> prevents multiple tabs from getting the same worker.
I can't find anyway to make this code not add the ?<timestamp> during the fetch.
The docs explicitly mention that SharedWorker is supported, but there's no recipe given like the other workers, so I suspect maybe this wasn't tested with multiple tabs (since it does appear to work like the new Worker code).
🐛 bug report
SharedWorkers do not work. The code below appears to work in the fact that you get a worker, but parcel's adding of
?<timestamp>
prevents multiple tabs from getting the same worker.I can't find anyway to make this code not add the
?<timestamp>
during the fetch.The docs explicitly mention that SharedWorker is supported, but there's no recipe given like the other workers, so I suspect maybe this wasn't tested with multiple tabs (since it does appear to work like the
new Worker
code).🎛 Configuration (.babelrc, package.json, cli command)
CLI:
start": "parcel serve src/demo-app/index.html --dist-dir build
🤔 Expected Behavior
The
?timestamp
can't be added for sharedworkers so that each web page gets the same worker😯 Current Behavior
Each tab gets a new worker. This can be seen using:
chrome://inspect/#workers
to view the workers when new tabs are open.💁 Possible Solution
...
🔦 Context
Trying to use SharedWorkers in a web app to help communicate data amongst multiple tabs.
💻 Code Sample
🌍 Your Environment
The text was updated successfully, but these errors were encountered: