My website does not have a service worker

1. Create a JavaScript file at the root of your website named serviceWorker.js with the following content:

// Contents of https://yoursite.com/serviceWorker.js
importScripts('https://static.fanplayr.com/client/sw.js');
  • This file should be public and accessible at the root of your server.

  • This file should be served with the Content-Type: text/javascript header.

2. Include the following HTML on all pages of your website:

<script src="https://static.fanplayr.com/client/sw-load.js" data-path="/serviceWorker.js"></script>
  • If you are using a service worker with a different file name, please update the data-path attribute accordingly.

Last updated