Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在构建一个允许有限数量的本地存储的应用程序。我正在从网页中获取文本并将其存储在本地存储中。我试图弄清楚在达到我的最大值 5mb 之前我能够(大致)存储多少。
知道一个 10,000 个字符的字符串会存储在 localStorage 中吗?
我只是用 20,000 个字节计算 10,000 个字符。对于 UFT-8 来说应该是一个安全的选择,并且符合 UTF-16 的要求