mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-05-01 19:12:57 +02:00
Add dummy SWer
This commit is contained in:
@@ -15,6 +15,11 @@
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png" />
|
||||
<link rel="manifest" href="./site.webmanifest" />
|
||||
<script>
|
||||
// Register minimal service worker for PWA installability.
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('./sw.js').catch(function() {});
|
||||
}
|
||||
|
||||
// Start critical data fetches before React/Vite JS loads.
|
||||
// Must be in <head> BEFORE the module script so the browser queues these
|
||||
// fetches before it discovers and starts downloading the JS bundle.
|
||||
|
||||
12
frontend/public/sw.js
Normal file
12
frontend/public/sw.js
Normal file
@@ -0,0 +1,12 @@
|
||||
// Minimal service worker required for PWA installability.
|
||||
// No caching — this app is network-dependent. All fetches pass through.
|
||||
|
||||
self.addEventListener("install", function () {
|
||||
self.skipWaiting();
|
||||
});
|
||||
|
||||
self.addEventListener("activate", function (event) {
|
||||
event.waitUntil(self.clients.claim());
|
||||
});
|
||||
|
||||
self.addEventListener("fetch", function () {});
|
||||
Reference in New Issue
Block a user