We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea38162 commit 85b0c20Copy full SHA for 85b0c20
smo-frontend/src/components/VersionCheck.tsx
@@ -16,6 +16,24 @@ const VersionCheck: FunctionComponent = () => {
16
}
17
18
const handleRefresh = () => {
19
+ // Unregister service workers to avoid caching issues
20
+ if ("serviceWorker" in navigator) {
21
+ navigator.serviceWorker.getRegistrations().then((registrations) => {
22
+ for (const registration of registrations) {
23
+ registration.unregister();
24
+ }
25
+ });
26
27
+
28
+ // Clear caches
29
+ if (globalThis.caches) {
30
+ globalThis.caches.keys().then((names) => {
31
+ for (const name of names) {
32
+ globalThis.caches.delete(name);
33
34
35
36
37
globalThis.location.reload();
38
};
39
0 commit comments