DEV Community

Discussion on: JavaScript Service Workers, Visualized

icalrn profile image
Faisal Rahman

Such a concise yet comprehensive article on service workers!

I have one question though. What will happen if the service worker intercepts a request from the browser and forwarded the request to the server, but before the request gets fulfilled, the browser navigates away from the page that made the request? Without service workers, the request would be canceled by the browser AFAIK. What will the service worker do in such cases?