In Firefox, Service Worker APIs are also hidden and cannot be used when the user is in private browsing mode.Īt this point, your service worker will observe the following lifecycle: Having modified network requests, wide open to man in the middle attacks would be really bad. Service workers only run over HTTPS, for security reasons. It is designed to be fully async as a consequence, APIs such as synchronous XHR and Web Storage can't be used inside a service worker. It takes the form of a JavaScript file that can control the web-page/site that it is associated with, intercepting and modifying navigation and resource requests, and caching resources in a very granular fashion to give you complete control over how your app behaves in certain situations (the most obvious one being when the network is not available).Ī service worker is run in a worker context: it therefore has no DOM access, and runs on a different thread to the main JavaScript that powers your app, so it is non-blocking. A service worker is an event-driven worker registered against an origin and a path.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |