This article addresses a common issue regarding the service worker file with regards to push notifications.

The following points need to be kept in mind:

  • If there are multiple service worker(sw.js) files, then only the file whose script that loads first will be active and the rest of the files will be ignored.
  • If the service worker file is placed in your root directory with a different name other than sw.js, then the following step needs to be implemented to make sure that the .js file will work in tandem with the service: If you’ve named your service worker file as ‘service-worker.js’(just an example) then you need to add a piece of code which looks like this

Also, Read

API Code – Integration & HTTP/HTTPs Website.

Is there any limit on the number of websites, notifications or users to send notifications to?

Follow our Social Media pages.