Questions tagged [browser-storage]
Data stored by a web browser in a nonvolatile format, often used for configuration or caching.
21 questions
2
votes
1
answer
286
views
Efficient browser `StorageEvent` handling
I have this class EfficientStorageEventProvider, which is responsible for efficient handling of StorageEvent
...
1
vote
0
answers
57
views
Storage manager which creates super simple API to talk with chrome storage
Here's some background information: I was working on a Chrome extension called Netflix Hotkeys (you can find it here), and I realized that I needed a persistent storage solution for storing user ...
0
votes
1
answer
93
views
Better localStorage API
I wasn't quite happy with the way localStorage handles non-string values, for example ...
2
votes
1
answer
742
views
Google Chrome Service Worker Persistent Storage Caching System
Moving from Google Chrome Extensions’ Manifest V2 to Manifest V3, service workers replace background pages. Background pages can be configured to be persistent, but service workers can’t be persistent....
2
votes
0
answers
51
views
Javascript client storage with the same persistence as a session cookie
I want to implement a client storage mechanism that is as persistent as a session cookie but with more storage capacity.
I am doing this by encrypting the data before storing it and saving the keys in ...
2
votes
0
answers
1k
views
localStorage should expire after 24 hours
The following code is checking if the user's browser is IE and if this is the case and there's no localStorage yet, it sets a localStorage, which should be valid for only 24 hours.
...
1
vote
1
answer
1k
views
Unit Test case to check if localstorage is empty once I logout of the Web app
I am trying to clear my localstorage when I am logging out of the application. I want to write a unit test case in Jasmine to check if this task is performed when logout function is run. I am writing ...
2
votes
2
answers
156
views
DataService that fetches data not loaded already or loads cached values
I load an array from an API that is available throughout the user's whole session. This data is unlikely to change, so it can be cached safely. I have a DataService ...
1
vote
1
answer
1k
views
Language switcher, consulting browser's localStorage
I'm using angular 6 and ngx-translate. This is my switch language function
...
0
votes
2
answers
80
views
Picking a time based on when the app was last used
I am trying to set up a time variable as a local storage property to be retrieved when I open my app in my browser.
If I open it for the first time, today, I'll set it up to today at midnight.
...
2
votes
1
answer
179
views
yandex-maps service for save places
I made script which create marker on the map after mouse left button click. And after mouse right button click marker removed.
All markers coordinates storage in browser localStorage.
I use yandex-...
1
vote
1
answer
189
views
Places memoized service via Google Maps
I made a service which saves places to localStorage after the user clicks the left mouse button on the map. When the user clicks the right mouse button on the ...
3
votes
2
answers
13k
views
Getting images and saving them to localstorage
The code in this project accepts an image URL and creates an <img> tag dynamically, using the image URL as the src attribute value. The image *name *and URL ...
4
votes
1
answer
3k
views
Keeping a search history in localStorage, with a length limit
I'm having a problem figuring out how I can make this particular part of my code DRY. Currently, the code is repeating itself but with minor changes in each case of a switch.
SearchParam is a string ...
3
votes
1
answer
467
views
Online notepad in JavaScript
I have been told for my code below i need to "Improve and optimise the codebase of the application to reflect modern and best coding practices". Can anyone help me in doing this? As I know the service ...