Where is the storage location for each of them? the local storage
I heard that it is html5
and is better than session
and cookie
, what is the difference between them?
Where is the storage location for each of them? the local storage
I heard that it is html5
and is better than session
and cookie
, what is the difference between them?
Yes. Local storage and Session Storage are two methods that are part of the HTML5 DOM upgrade. We call these Web Storage methods. Local storage and session storage as all elements of the DOM can be handled with Javascript and / or Json. To be very objective I will explain this way:
Local Storage: With it you can privately store data in the browser. The data will be persisted until the user forces the method to destroy the object. Usage examples:
In the case of session storage, the goal is the same. the only difference is that the data will be stored differently for each tab of the browser and if in case the user close the tab the data of that tab will be deleted automatically. Usage examples:
Cookies: These are files that serve the same purposes of storing user data for use in the application / site. The difference is that cookies are stored on the client computer and have inferior performance compared to web storage. Example usage:
Session: Protocol / method used to create the communication line in an authenticated way between your user and the program / application to be used. That is, in the session the data must be encrypted in the transmission. Example usage:
I hope I have helped. Big hug. \ o /