Shared Worker
To see a working result please go directly to: https://antigone2.github.io/sharedWorkers/
In this example I would like to demonstrate, how to share state between different pages, or opened windows.
In the moment the page is optimized only for Firefox web browser.
Description
I have created a Shared Worker which does nothing but counts - after 0.5s ads 1.
I have created two web pages to demonstrate, that you can share state after going from one to another, or open new window.
If you stop/start worker in any window, or on any page, the counting stops everywhere.
Resources
2017 created by Antigone2 | gitHub | freeCodeCamp | jsFiddle | codePen