231 questions
-5 votes
1 answer
86 views
Why does localStorage data disappear after browser restart in Chrome? [closed]
I’m using localStorage in a small web app to persist user preferences. However, when I restart the browser, sometimes the stored data disappears. After closing and reopening Chrome, getItem("...
2 votes
1 answer
826 views
Does navigator.storage.persist() only protect against data removal in the case of storage pressure?
According to the MDN docs browser-stored data can be evicted in three cases: Storage pressure eviction Browser maximum storage exceeded eviction Proactive eviction For the first case - "Storage ...
2 votes
3 answers
352 views
In which order `storage` event is received?
In which order storage event is received? For example, tab_1 executes code localStorage.set('key', 1); localStorage.set('key', 2); and tab_2 executes code localStorage.set('key', 3); localStorage.set(...
2 votes
2 answers
3k views
Using ngx-webstorage with Angular 17
I started working with Angular 17. As per recommendation, I went with a no app.module. Now, I am trying to use ngx-webstorage and for a StateStorageService I used this in earlier version of angular ...
0 votes
1 answer
175 views
Why can't I obtain a memory-backed implementation of the Storage interface from the Web Storage API?
Refs: Spec, MDN If I wanted an object that implements the API of the Storage interface — but not for the persistence (backed only by memory): I understand that I could re-implement it on my own using ...
0 votes
0 answers
156 views
How to correctly handle large media files in a web project?
I'm starting a new Vue 3 + Vite project and its a simple landing page. Its nothing too fancy but I was in doubt what would be the best way to handle media files - especially some large files like ...
1 vote
3 answers
65 views
How to add point to an existing score value that works after refreshing the bowser
I have an issue with adding a point to the existing/old score value after I refresh the web page. Instead of adding a point to the existing/old score, it replaces it, which means if there's an ...
0 votes
1 answer
573 views
Javascript - How to store player names and score using localStorage and then displays the stored data in real time
I am struggling with the window.localStorage. I don't know how to use it to achieve my goal. My current code just stores the player's score in the server so if I restart the server, their score will ...
1 vote
0 answers
52 views
I want to save the data in a textbox created repeatedly in JavaScript using webstorage
this is my code <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>CV Information</title> <link rel="stylesheet" href="...
0 votes
1 answer
54 views
How much information can I store in IndexedDB?
I've been searching but couldn't find an updated answer to 2022: what is the maximum size I can store in IndexedDB?
3 votes
2 answers
1k views
List all `navigator.storage` files / Clear storage cache
I store multiple large assets in navigator.storage, to avoid large downloads. With it, I would like to do the following as well: "List" - to show all the saved files "Clear cache" ...
3 votes
1 answer
752 views
Chrome StorageManager API reporting quota much bigger than expected
I want to get the upper limit I can store in indexedDB for storing many large binary files, while StorageManager.estimate() reports much bigger than my real free disk space. Then I found this answer ...
1 vote
0 answers
27 views
Where is localStorage object is defined? [duplicate]
Where the browser localStorage variable defined and how is that possible we can access window.localStorage object through a global browser variable localStorage?Seems like this browser behaviour is ...
0 votes
2 answers
587 views
Using localstorage to save background
I have a button which change background color and title color button id="change" onclick="change()">Change background!</button> ...
0 votes
2 answers
254 views
How to display only three items inside cart dropdown JavaScript?
I have shopping cart feature added in my ecommerce web app. So inside header there is a an icon of cart. So when anyone click on that icon dropdown appears which shows added items inside cart. So if I ...