localStorage大小限制

localStorage大小限制

本文介绍了子域的HTML5 localStorage大小限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTML5的localStorage数据库通常是大小限制的 - 每个域的标准大小为5或10 MB。这些限制是否可以通过子域来规避(例如,example.com,hack1.example.com和hack2.example.com都有自己的5 MB数据库)?标准中是否有任何内容指定父域是否可以访问其子项的数据库?我找不到任何东西,我可以看到任何一种方式的参数,但似乎必须有一些标准模型。

HTML5's localStorage databases are usually size-limited — standard sizes are 5 or 10 MB per domain. Can these limits be circumvented by subdomains (e.g. example.com, hack1.example.com and hack2.example.com all have their own 5 MB databases)? And is there anything in the standard that specifies whether parent domains can access their children's databases? I can't find anything, and I can see arguments for doing it either way, but it seems like there has to be some standard model.

推荐答案

通过

它还提到:

这篇关于子域的HTML5 localStorage大小限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 09:01