开发者

How does HTML5 localstorage work?

I have to create one application in which the user is to get some data based on his username and passsword.

Is it possible to create single persistant local storage for multip开发者_运维知识库le HTML pages of a website? Do I have to insert records everytime the page loads? My expectation is that inserting records one time for multiple users. Can anyone help?


Yes, the storage is at domain level so you don't have to 'refresh' or re-populate the data on page load. It'll also survive sessions too, but remember that everything is a key/value pair stored as a string so you'll need to parse it when you read it back out (JSON.parse());

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜