4 ms·
They are run out of the UI thread of your web site, but their lifecycle is managed largely by the browser. As a developer you can't count on your service worker
by rictic 12y ago
They are run out of the UI thread of your web site, but their lifecycle is managed largely by the browser. As a developer you can't count on your service worker running at any given time. Their main feature is that they are in between your app and every network request that is made by your app, giving incredibly powerful caching and offline capabilities. They're also part of the foundation of push messaging for the web.
Here's a good overview: http://www.html5rocks.com/en/tutorials/service-worker/introduction/ http://www.html5rocks.com/en/tutorials/service-worker/introd...