Skip to content

Tag: service-worker-events

Should I return a promise in a JS Service Worker onFetch callback function if I don’t want to do anything with the original request?

My scenario is the following: I have a Progressive Web App that uses a Service Worker where I need to catch the request and do something with it every time the user requests a resource or leaves the current URL I’m handling that through adding a callback to the fetch event of the worker I only care about requested resources