Search code examples
progressive-web-appsservice-workermanifestweb-pushmanifest.json

Can I use Service Worker (just for web push) in the absence of manifest.json?


All I need is my Service Worker to register as an event listener for the 'push' event.

However, when I look through multiple online courses on progressive web apps, they all include manifest.json at some point, which makes me question if including manifest.json is needed.

I don't need Cache API or installable experience; can I use Service Worker in my app to subscribe to the events I want?


Solution

  • Why don't you just try it?

    In any case yes, you can use Web Push with just a Service Worker. You don't need the PWA manifest.