Aurelia Custom Service Worker

Hi @radenkozec, if you truly want to control offline capability with a Service Worker, then you need to follow the specification for what makes a PWA. You would need to have a manifest that describes all of your dependencies. As far as writing a Service Worker, once, installed, you can intercept all fetch requests simply by implementing your Service Worker. I have used it extensively in several apps where I have written my own Service Worker by hand to facilitate what I wanted it to do. I think writing your own Service Worker is an excellent exercise of understanding what happens and how it works with the rest of your application.

Hopefully, that helps.

1 Like