PWA Service worker force refresh

Date: 2020-12-04
const forceRefresh = async () => {
	try {
		var registrations = (await navigator.serviceWorker.getRegistrations()) ?? [];
		for (const registration of registrations) {
			registration.unregister();
		}
	} finally {
		window.location.reload(true);
	}
};
43510cookie-checkPWA Service worker force refresh