Modern browsers offer different options for storing website data, allowing this data to be retrieved when needed. In this tutorial, you will discover:
You can download the example code used in this topic on GitHub.
The browser storage will help you to have some useful functionalities or act as a cache to reduce the load to the server. Some uses cases for the browser storage:
There are 6 types of browser storage:
| Cache | Cookie | IndexedDB | Local Storage | Memory | Session Storage | |
| Lifetime | Until deleted | Expired time/Until deleted | Until deleted | Until deleted | When the user exits the tab | When the user exits the tab | 
| Allowed Data Type | Request,Response | Key value | Various types | Key value | Various types | Key value | 
| Shared between tabs | Yes | Yes | Yes | Yes | No | No |