html5 localstorage能存多少数据

根据 WHATWG 规范描述如下:

A mostly arbitrary limit of five megabytes per origin is recommended. Implementation feedback is welcome and will be used to update this suggestion in the future.

规范建议的本地数据存储不超过5M,同时大多数浏览器默认的localstorage存储大小也是5M限制。

localstorage大小限制可以通过以下面的代码进行测试: 继续阅读“html5 localstorage能存多少数据”