I'm interested in running background processes once users go to a website. My question is very broad but for example I'd like to poll a JSON API every minute or so and send the user a web notification anytime the response from the JSON API changes. Is this possible with service workers? How can I accomplish this?
If this is possible, then is it possible that I can run a WebAssembly file in a service worker so that the application is running even when the website is not open?
Or can I run a service worker to grab the latest version of a site and have it cached so that the website loads immediately on their next visit?