Angularjs LocalStorage Vs Session Storage Vs Cookies
Hi Viewers Today Discussed Angularjs LocalStorage Vs Session Storage Vs Cookies include ngstorage means angular storage. I'm working a new app where I need to keep some data during the user is logged in and I have that question,what is the difference among localstorage and sessionstorage.
Angularjs LocalStorage Vs Session Storage Vs Cookies |
Angularjs LocalStorage and SessionStorage are both Called Web Storage and features of HTML5.
localStorage stores information as long as the user does not delete them.
sessionStorage stores information as long as the session goes. Usually until the user closes the tab/browser.
cookies are simply cookies, which are supported by older browsers and usually are a fallback for frameworks that use the above mentioned WebStorages.
sessionStorage : The sessionStorage object stores data only for a session, meaning that the data is stored until the browser (or tab) is closed. it is not available when a file is run locally.
Data stored in the sessionStorage object is accessible only from the page that initially stored the data; so this doesn't meet your requirement
localStorage : Data stored using the localStorage object is persisted until it is specifically removed via JavaScript or the user clears the browser’s cache.
2 comments
commentsGood And Helpful Article
ReplyThanks
Reply