prefix is not set correctly in sessionStorage
See original GitHub issueI try to change prefix using setKeyPrefix. Everything is OK in localStorage (cicoub13-test = issue) but prefix is not set in sessionStorage (ngStorage-test = issue).
Config code :
$localStorageProvider.setKeyPrefix('cicoub13-');
Controller code :
$scope.testLocal = function() {
console.log('testLocal');
$localStorage.test = 'issue';
};
$scope.testSession = function() {
console.log('testSession');
$sessionStorage.test = 'issue';
};
Test with yo angular and version 0.3.10 of ngStorage
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
HTML5 Local Storage URL Prefix - javascript - Stack Overflow
The problem is localSotrage is working on www.mydomain.com but the thing is it is not working when i go to www.mydomain.com/myarticle. Is there ......
Read more >JSDoc: Namespace: storage
Creates a session storage object that scopes all the keys using a prefix "Acme" and the application id. It then sets and gets...
Read more >Variable Prefixes | CpExtra Help - Infosemantics
Any variable whose name starts with SS_ (not case sensitive) will be treated as a session storage variable. Session storage is similiar to...
Read more >sessionStorage fails with security error when cookies are set ...
sessionStorage fails with security error when cookies are set to "ask every time" (NS_ERROR_DOM_SECURITY_ERR exception)
Read more >Browser - MarketSquare
Compared to Selenium, these do not require their own browser process. ... The explicit selector strategy is specified with a prefix using ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Wait.
You should need to do it for both $localStorageProvider and $sessionStorageProvider, as they are 2 different providers and services.
Can you give it a try?
And see if that doesn’t fix it for you?
Please note them into Document.