Local Storage & Session Storage in Tamil | Use Cases | Code Examples | Interview | Tamil Web Dev

preview_player
Показать описание
- Understanding Storage types in browser mainly Web Storage API including, localStorage and sessionStorage,
- Use cases of the Browser storage
- Difference between cookies and Web Storage API
- What is same origin policy and how it works
- Difference between local storage and session storage
- Code Example for how to use Local Storage functions

Reach me out at:
Youtube - @TamilWebDev

Web Storage APIs are used by developers to store data into the browser. Now the data here refers to the key-value pair of strings. Now storing this data can be done by 2 mechanisms: either by using the sessionStorage API and the localStorage API.

So in session storage, the data is stored in the browser’s memory for that specific session. Session more here means until you close the browser window. Unlike cookies, the data in sessionStorage is never transferred to the server while making a network request.

The storage limit of session storage is also very high when compared to cookies. The cookies which can generally store around 4000 bytes of data here session storage can store at least 5 MB of data or even more than that depending on the device and browser. Which is a lot!

If we talk about localStorage, it is almost the same as the session storage but the major difference is that it does not have an expiry. So Even if you close the browser and restart your system and come back again anytime the data persists. That makes it unique and very useful. And among these 3, localStorage has higher memory limit.

It’s used a lot even by many big companies to store some less relevant user-specific data into their browsers. Some companies even use it to optimize the performance of the web page speed as access localStorage is faster than making a request to the server and getting the data.

One more important thing to note here is that due to security reasons it follows the same-origin policy. Same-Origin refers to the same Protocol, same host, and the same port.

Later half of the video also contains the code demo for the localStorage APIs which you can use to get data, set data or clear data from the storage.

If this video was helpful, give it a thumbs up and subscribe to my channel for more such videos. 🔔

If you want me to cover any specific topic, then comment down below. I would be happy to help you.
Рекомендации по теме
Комментарии
Автор

Bro romba clear ah explain panringa... javascript and react js concepts upload pannunga bro...and storage pathina videos um pannunga bro

malarammu
Автор

Anna... bootstrap class upload pnnunga anna

kookieedits
Автор

Bro Auth token ethula store pannanum..local or session

prabakaranm