![]() ![]() The code will work in all browsers that support service workers, but the location and availability of the developer tools may differ between browsers and browser versions. ![]() For simplicity, this chapter will assume you are using Chrome to visit your app. This chapter explores and uses many of the developer tools available in the browser. Service worker peculiarities can be confusing at first, but once you understand the simple flow of a service worker from one state to the next, it all makes sense. And yet, just like a cheat-code in an old-school video game, this convenient workaround makes things easy for you but does not represent how things behave in the real world. In Chapter 2, I encouraged you to turn on “Update on reload,” which allowed you to see any change made to your service worker immediately after each page refresh. You may have even encountered situations where you changed the service worker code, and yet no matter how many times you refreshed the page, the change did not take. Sometimes when loading a page, your service worker code seems to be in control of the page, and sometimes you need to refresh the page first (even though the service worker is active). Now that you have had a chance to play around with service workers a bit, you may have noticed a few peculiarities about the way they behave. Service Worker Lifecycle and Cache Management ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |