HTML5会话存储限制?

HTML5的sessionStorage有几个问题:

> localStorage的5MB限制是否包含sessionStorage? (即WebStorage API真的是5MB的限制)
>如果sessionStorage不具有类似于localStorage的最大大小限制?

我发现这个网站http://dev-test.nemikor.com/web-storage/support-test/在另一个SO的问题,我想知道数据是否仍然相关?

解决方法

> localStorage的5MB限制是否包含sessionStorage? (答:NO; Supported by)
> WebStorage API真的是一个5MB的限制(答案:NO; Supported By)
> sessionStorage是否具有类似于localStorage的最大大小限制? (答:NO; Supported By)

希望我简单地回答了你所有的问题.这是一个特别翔实的部分:

QUOTAS

You can imagine the chaos if any website was allowed to
populate unSUSPECTing hard drives with gigabytes of data! Thus,
browsers impose limits on storage capacity. When your app attempts to
exceed that limit,the browser will typically show a dialog to let the
user confirm the increase. You might expect the browser to enforce a
single limit for all storage an origin can use,but the major browsers
are actually enforcing limits separately for each storage mechanism.
This may change in the future,but for Now,you should think of the
browser as maintaining a 2-D matrix,with “origin” in one dimension
and “storage” in the other. For example,“07003” is
allowed to store up to 5MB of Web Storage,25MB of Web sql Database
Storage,and forbidden to use Indexed Database. Another welcome
enhancement in this area would be user interfaces to let users view
and control how much space they have allocated for each origin. There
are also environments where the user can see upfront how much storage
will be used,e.g. in the case of the Chrome Web Store,when a user
installs an app,they will be prompted upfront to accept its
permissions,which include storage limits. One possible value is
“unlimited_storage”.

以上文字摘自http://www.html5rocks.com/en/tutorials/offline/storage/

相关文章

HTML5和CSS3实现3D展示商品信息的代码
利用HTML5中的Canvas绘制笑脸的代码
Html5剪切板功能的实现
如何通过HTML5触摸事件实现移动端简易进度条
Html5移动端获奖无缝滚动动画实现
关于HTML5和CSS3实现机器猫的代码