简体   繁体   English

本地存储浏览器

[英]Localstorage browsers

It is known that the localstorage maximum size for Google Chrome is 10 MB. 已知Google Chrome的本地存储最大大小为10 MB。

If my website is filling that localstorage with data of roughly 10 MB or less. 如果我的网站用大约10 MB或更少的数据填充该本地存储。 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! 我的意思是,某人可以访问一个网站,这会使他的浏览器的本地存储饱和,BAM破坏了他对所有其他网站的浏览体验!

The limit is per origin , not overall. 限制是针对每个来源 ,而不是整体。 So your site can store its 10MB, another site can store its 10MB, etc. 因此,您的站点可以存储10MB,另一个站点可以存储10MB,依此类推。

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). 只有您的网站才能访问或在浏览器为您的网站维护的本地存储中存储任何内容(“网站”更准确地说是“来源” 有关详细信息,请参见Web存储规范以及与其链接的HTML规范部分 )。

It's 10MB per Origin, therefore another site can use 10MB per their origin. 每个起点10MB,因此另一个站点每个起点可以使用10MB。 Also the storage can only be manipulated by the origin in which it originated. 同样,存储只能由其起源来操纵。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 不同浏览器的localStorage问题 - Problems with localStorage with different browsers 在现代浏览器中的HTML 4网站上的LocalStorage? - LocalStorage on HTML 4 website in modern browsers? 在不同的浏览器中检测localStorage v sessionStorage对象 - Detecting localStorage v sessionStorage objects in different browsers 移动Web浏览器和移动Web应用程序共享同一个localStorage吗 - Do mobile web browsers and mobile web apps share the same localStorage localStorage.getItem()在不同的浏览器中给出不同的结果 - localStorage.getItem() gives a different result in different browsers localStorage无法传输数据,并非在所有浏览器中都适用 - localStorage cannot transfer data, does not work in all browsers 使用angularJS的localStorage-如何将值动态绑定到浏览器中的所有选项卡 - localStorage with angularJS - how to dynamic bind value to all tabs in browsers 使用多个浏览器从localStorage获取不需要的数据 - Getting unwanted data from localStorage using several browsers 如果用户有多个浏览器,localStorage空间如何分配? - How is localStorage space allocated if a user has multiple browsers? 如何使localStorage和Cookies像React Native中的普通浏览器一样工作? - How to make localStorage and Cookies work like normal browsers in React Native?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM