Skip to content

TechNuttyDev/Service-Worker

Repository files navigation

Service Worker Sample - Built for Wordpress

I built this service worker for our Wordpress site TechNutty (It's a little different over there as we use OneSignal to handle our push notifications).

This is just a sample of how you could implement Service Worker into your site, you would need to change aspects of it to work with your own site.

In order to get it working you will need to link to the service worker fle from your project in the sw-activate.js file, and then add a link to the reg file in the footer of your project.

Please feel free to expand upon this and let me know if you have improvements :).

Of course, all of this is code that has been built to work with technutty.co.uk, you would have to change it to work with your own site.