+ 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
3 Respuestas
+ 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
+ 27
this is a sample code to understand webstorage : https://code.sololearn.com/W8T30YWL9dDx/?ref=app
+ 4
thanks my friend