mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-10 21:00:28 +00:00
feat: versionedLocalStorage
This commit is contained in:
1 parent
2228a3f961
commit
6cec2e74d0
5 files changed
+98
-32
No files matched your search
@@ -47,7 +47,7 @@ document.addEventListener("alpine:init", () => {
|
||||
// cache only the pictures of the last 4 visited profiles
|
||||
sessionStorage.setItem(storageKey, JSON.stringify(cacheContent.slice(-4)));
|
||||
} catch {
|
||||
// an exception is raised if the localstorage is entirely filled.
|
||||
// an exception is raised if the storage is entirely filled.
|
||||
// To be as safe as possible, delete the cached pictures.
|
||||
// A cache hit is not worth the page breaking.
|
||||
sessionStorage.removeItem(storageKey);
|
||||
|
||||
Reference in new issue
Block a user