filmov
tv
Save Data to Local Storage in Angular | Angular Tutorial

Показать описание
So we have created user registration form using a reactive approach. In this video we are going to save the data of this form in the browser's local storage.
Local storage is a type of web storage that allows a site to store and access data right in the browser with no expiration date. Data stored in the browser will persist even after the browser window has been closed.
This is supported by all the major browsers which support HTML 5. Although this is not the substitute of a server based database and we will store all this information in the database later in this tutorial.
But for creating mock ups or demos to the user we can quickly create an application that can run in the browser using this local storage. But remember we can not store more than 5MB data per domain in this local storage.
You can use it to store some information related to your application i.e. city list or something that does not change frequently as a cache. So you can check the local storage in your application to fetch the city list and if a customer has already visited your application, you will not have to go back to the server to fetch the city list. That will help to load your application faster for subsequent visits. Remember, you should never ever store user sensitive data in this browser storage. .
You can support me by donating on
Thanks
Studymash
Local storage is a type of web storage that allows a site to store and access data right in the browser with no expiration date. Data stored in the browser will persist even after the browser window has been closed.
This is supported by all the major browsers which support HTML 5. Although this is not the substitute of a server based database and we will store all this information in the database later in this tutorial.
But for creating mock ups or demos to the user we can quickly create an application that can run in the browser using this local storage. But remember we can not store more than 5MB data per domain in this local storage.
You can use it to store some information related to your application i.e. city list or something that does not change frequently as a cache. So you can check the local storage in your application to fetch the city list and if a customer has already visited your application, you will not have to go back to the server to fetch the city list. That will help to load your application faster for subsequent visits. Remember, you should never ever store user sensitive data in this browser storage. .
You can support me by donating on
Thanks
Studymash
Комментарии