简体   繁体   中英

Localstorage browsers

It is known that the localstorage maximum size for Google Chrome is 10 MB.

If my website is filling that localstorage with data of roughly 10 MB or less. In other words, my website data fits exactly so it can fill the localstorage to the limit so now the localstorage on my browser is at its maximum (cannot add data no more).

Can other websites still store their data into my localstorage?

If yes, how so?

If no, isn't that considered a huge draw back? I mean someone can visit a website once and it saturates his browser's localstorage BAM ruined his browsing experience for all other websites!

The limit is per origin , not overall. So your site can store its 10MB, another site can store its 10MB, etc.

Can other websites still store their data into my localstorage?

If you mean "my localstorage" as in, your website's, they can't. Only your website can access or store anything in the local storage maintained by he browser for your website ("website" is more accurately "origin," see the Web Storage spec and the section of the HTML spec it links to for details).

It's 10MB per Origin, therefore another site can use 10MB per their origin. Also the storage can only be manipulated by the origin in which it originated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM