Articles

Dive into my collection of in-depth articles, research papers, and long-form content. Each publication represents hours of research, thought, and careful crafting.

How do I check the size of local storage used by JavaScript?

User

1) storage limit per origin:

"User agents should limit the total amount of space allowed for storage areas, because hostile authors could otherwise use this feature to exhaust the user's available disk space.
(...)
User agents should allow users to see how much space each domain is using.
A mostly arbitrary limit of five megabytes per origin is suggested."

cf. Web Storage (Second Edition)

2) how much is already taken: in Chrome, now go to chrome://settings/siteData (previously, it was in: chrome://settings/cookies) and type in the name of the website you're wondering about, it will appear as "local storage" and you'll have the size and date of last modification when you click on it.

Question?

We'd like to hear from you.