Anonymous
Asked in
Cars &Transportation
·
2 weeks ago
Is it good practice to use local storage?
Contents
Is local storage good practice?
Never store sensitive information in LocalStorage. If malicious JavaScript code is added by you or your dependencies, they can retrieve user data or tokens you use to authenticate with APIs.
Should you use local storage?
Local storage provides at least 5MB of data storage across all major web browsers, which is a heck of a lot more than the 4KB (maximum size) that you can store in a cookie. This makes local storage particularly useful if you want to cache some application data in the browser for later usage.
Does local storage affect performance?
The main argument is localStorage is bad for performance, but mainly when used excessively and on pages/apps that don't get visited often. Real web application development always favoured a database solution instead of having a simple key/value store.
Related Questions
Relevance
-
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago -
Anonymous2 weeks ago
Expert answer2 weeks ago
Write us your question, the answer will be received in 24 hours