HTML 5 子域名本地存储大小限制

htmlweb developmentfront end technology更新于 2025/8/18 12:28:17

HTML5 的 localStorage 数据库大小受限。标准大小为每个域名 5 或 10 MB。建议每个源限制为 5 MB。

以下内容说明 −

User agents should guard against sites storing data under their origin's other
affiliated sites, e.g. storing up to the limit in a1.example.com,a2.example.com,
a3.example.com, etc, circumventing the mainexample.com storage limit.

对于大小限制 −

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

相关文章


有用资源