https://jakearchibald.imtqy.com/isserviceworkerready/demos/manual-response/ Found this example, it is possible to look at this problem in it:

I open DevTools, if I put breakpoint in SW addEventListener ('fetch') and enter fetch ('/') in the console, nothing will happen, but if I refresh the page and do the same, then a blue bar will appear to the right of the breakpoint, that is , the event will be caught.

Is it possible to make SW catch events before the first update? Browser: Chrome

  • Please provide a sample code that reproduces the problem. - Stepan Kasyanenko
  • @StepanKasyanenko and what you could not reproduce? - Yuri
  • The problem turned out to reproduce. But, according to the rules of stackoverflow , and indeed, for good, the question should contain an example of code that would reproduce the problem. - Stepan Kasyanenko
  • Try adding the following code to the install event handlers self.skipWaiting(); . Taken from developers.google.com/web/fundamentals/getting-started/… - Stepan Kasyanenko

0