html5 dom storage,Client-side data storing,DOM storage or HTML5 Local Storage?

问题

Im really confused when thinking about my requirement to store data locally for offline viewing.Now i have two options,DOM storage and HTML5 Local storage.

As im a complete newbiew in this particular topic,i need some help of SO Experts and Gurus.

Whats the Advantage and Dis-advantage of these two.?can any one compare these one.,so that i can understand deeply or give some reference links?

回答1:

DOM Storage or Web Storage is the collective name given to the following types of client storage options available in HTML5. It includes:

localStorage

sessionStorage

Local storage is persistent meaning the stored data will still be there when you close and re-open the browser window.

Session storage is temporary and is available as long as the page session lasts.

There is really no comparison between the two since technically they both are the same.

回答2:

Try to have a read here http://blog.sebarmeli.com/2010/11/22/understanding-webstorage/, you can easily understand the two objects, their methods, event attributes and their possible use.

来源:https://stackoverflow.com/questions/4021106/client-side-data-storing-dom-storage-or-html5-local-storage

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值