![]() addEventListener ( "fetch", event => ` ) Your service worker can forward a request to the network, respond with a previously cached response, or create a new response. The fetch handler receives all requests from an app, including URLs and HTTP headers, and lets the app developer decide how to process them. In addition to navigation and asset requests, fetching from an installed service worker allows page visits after a site's first load to be rendered without network calls. The fetch event lets us intercept every network request made by the PWA in the service worker's scope, for both same-origin and cross-origin requests. How is that possible? Thanks to the service worker fetch event. ![]() ![]() ![]() A key aspects of Progressive Web Apps is that they're reliable they can load assets quickly, keeping users engaged and providing feedback immediately, even under poor network conditions. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |