+ 6

Can anybody explain me about web stroage api

I learnt the web storage api in the lesson provided by this sololearn app but I don't understand it. please can anyone explain it to me

26th Apr 2017, 5:18 AM
Anish
Anish - avatar
3 Réponses
+ 29
Web Storage API provides mechanism by which browsers can store key/value pairs in a much intuitive fashion than using cookies. Like you have read in the SoloLearn tutorial about Web Storage, the two mechanism within web storage are (1) sessionStorage which maintains a separate storage for each given origin that is available for the duration of the page session ( as long as the browser is open including page reload and restore). (2) localStorage does the same thing but persist even when the browser is closed and reopened meaning it has no expiration. time
27th Apr 2017, 4:41 AM
Awele Omeligwe
Awele Omeligwe - avatar
+ 27
this is a sample code to understand webstorage : https://code.sololearn.com/W8T30YWL9dDx/?ref=app
27th Apr 2017, 5:14 AM
Awele Omeligwe
Awele Omeligwe - avatar
+ 4
thanks my friend
27th Apr 2017, 9:21 AM
Anish
Anish - avatar