All Projects → NekR → Self Destroying Sw

NekR / Self Destroying Sw

Licence: mit
Code-snippets and guides on removing ServiceWorker from a websiste.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Self Destroying Sw

wordpress-pwacommerce
PWACommerce - WooCommerce Mobile Plugin for Progressive Web Apps & Hybrid Mobile Apps
Stars: ✭ 20 (-92.34%)
Mutual labels:  service-worker
react-prpl-boilerplate
A simple boilerplate for learn PRPL pattern with React.
Stars: ✭ 23 (-91.19%)
Mutual labels:  service-worker
polymerx-cli
⚡ Unlock the power of Polymer 3, Web Components and modern web tools.
Stars: ✭ 30 (-88.51%)
Mutual labels:  service-worker
clean-to-the-core
🍏 A gluten free, accessible, offline-first, progressive web app for creating healthy meals.
Stars: ✭ 12 (-95.4%)
Mutual labels:  service-worker
block service workers
Extension to block Service Workers registration in Chrome (also see https://shadow-workers.github.io )
Stars: ✭ 29 (-88.89%)
Mutual labels:  service-worker
jekyll-pwa-workbox
A Jekyll plugin using Workbox to make your PWA / Website available offline.
Stars: ✭ 22 (-91.57%)
Mutual labels:  service-worker
react-weather-app
⛅️ PWA Weather App made with ReactJS
Stars: ✭ 147 (-43.68%)
Mutual labels:  service-worker
angular-webpack-skeleton
This project is deprecated. Please refer to https://github.com/Ks89/angular-cli-skeleton
Stars: ✭ 16 (-93.87%)
Mutual labels:  service-worker
Prelude
A web app for practicing musical sight reading skills
Stars: ✭ 24 (-90.8%)
Mutual labels:  service-worker
mercury
A serverless, clean, and persistent note dump that works fully offline
Stars: ✭ 19 (-92.72%)
Mutual labels:  service-worker
data-transport
A generic and responsible communication transporter(iframe/Broadcast/Web Worker/Service Worker/Shared Worker/WebRTC/Electron, etc.)
Stars: ✭ 27 (-89.66%)
Mutual labels:  service-worker
mswjs.io
Official website and documentation for the Mock Service Worker library.
Stars: ✭ 77 (-70.5%)
Mutual labels:  service-worker
badaso
The API & platform builder, build your apps 10x faster even more, it's open source & 100% free !
Stars: ✭ 650 (+149.04%)
Mutual labels:  service-worker
Mosque-Screen
Chat: https://discord.gg/CG7frj2 - Email: [email protected]. We do not provide any support, this is a volunteer-based project therefore we cannot commit to any time to resolve local issues.
Stars: ✭ 54 (-79.31%)
Mutual labels:  service-worker
service-worker-exercises
Get started with Service Worker
Stars: ✭ 37 (-85.82%)
Mutual labels:  service-worker
webpush-example
A basic push notifications app built on Laravel and Vanilla Javascript.
Stars: ✭ 26 (-90.04%)
Mutual labels:  service-worker
http4s-dom
http4s, in a browser near you
Stars: ✭ 13 (-95.02%)
Mutual labels:  service-worker
Pwa Fundamentals
👨‍🏫 Mike & Steve's Progressive Web Fundamentals Course
Stars: ✭ 256 (-1.92%)
Mutual labels:  service-worker
forge-disconnected
Sample Forge application using Service Workers and Cache APIs to provide a limited offline support.
Stars: ✭ 15 (-94.25%)
Mutual labels:  service-worker
egg-typescript-element-kit
基于 Egg + TypeScript + Element 博客系统,包括前台系统和后台管理系统
Stars: ✭ 19 (-92.72%)
Mutual labels:  service-worker

Self-destroying ServiceWorker

Code-snippets and guides on removing ServiceWorker from a websiste.

Motivation

ServiceWorker is more and more often used in websites development. It’s being added to popular tools and libraries. Sometimes, it might be used unintentionally (generated by a pre-configured tool automatically) or for experimental purposes. This leads to a situation where ServiceWorker needs to be removed.

Read more on Medium

How to use

  1. Remove everything about your previous ServiceWorker (registration/uninstallation code, ServiceWorker file)
  2. Create a file with the same name as your previous ServiceWorker and put it in the same place where your previous ServiceWorker was
  3. Put following code into the file:
self.addEventListener('install', function(e) {
  self.skipWaiting();
});

self.addEventListener('activate', function(e) {
  self.registration.unregister()
    .then(function() {
      return self.clients.matchAll();
    })
    .then(function(clients) {
      clients.forEach(client => client.navigate(client.url))
    });
});
  1. Deploy your project! 🎉

With webpack | With Gatsby

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].