What is the best approach to save and use online/offline status all over a client side only app created with sveltekit?
Session/Cookies?The app deployed as static using addapter_static, as PWA with offline support
In order to avoid writing the following code on every page.
// addEventListener versionwindow.addEventListener("offline", (event) => { console.log("The network connection has been lost.");});// onoffline versionwindow.onoffline = (event) => { console.log("The network connection has been lost.");};
According to the changes status I want to change the top menu background color, show background image on every page and in some cases disable buttons