So. The question I'm asking myself now is how to fix this. Giving .domain.com a shared quota will allow one tumblr or github pages user to monopolize all storage, effectively removing local storage for this kind of scenario (also removing it for the host which is even more annoying). A maybe workable solution would be to only allow creation of new keys for the first-party origin. What I mean is that whatever.example.…
Limit how much can be placed in localstorage regardless of site based on time. (Or perhaps prompt whenever that limit is reached, in case there is a legit reason for it.) This isn't perfect in that your localstorage could still be filled up slowly if you leave a page open in the background, but I think this solution is robust to many different techniques.
HTML5 localStorage allows sites to fill up users' hard disks
131–140 of 191 posts
Re: HTML5 localStorage allows sites to fill up users' hard disks
#132Earlier quoted context omitted.
Any kind of DOM storage (cookies, localStorage, IndexedDB, etc.) is ephemeral. The browser needs to decide the maximum amount of disk space that it wants to consume, and then when it hits that limit, it needs to start throwing away (garbage collecting) some of the data based on some policy like LRU. If the web app really needs permanent storage then that permanence of storage needs to be granted explicitly by the use…
I think localStorage already asks the user.
Re: HTML5 localStorage allows sites to fill up users' hard disks
#133Please sir, may I have some more? This is awesome. I got to 935mb of space used before Google Chrome on Windows 7 64bit crashed dramatically. However, good news, when I restored the tabs it resumed right where it left off filling up my hard drive.
Re: HTML5 localStorage allows sites to fill up users' hard disks
#134Here is how it looked in Opera: http://i.imgur.com/SOoadOB.png
Re: HTML5 localStorage allows sites to fill up users' hard disks
#135Earlier quoted context omitted.
> Limit the total local storage space at a browser level. E.g. 1GB I wouldn't mind Google Maps to fill some 100 GiB with map data so that I can have detailed maps while I am offline in some remote African town.
You might like OpenStreetMap! You can get the whole planet in a http://planet.openstreetmap.org/planet/ Granted that is the raw data, but you can extract the regions you need easily and then render them on demand.
But good to know anyway!
Re: HTML5 localStorage allows sites to fill up users' hard disks
#136Just ask the user if its okay, like with geo data, translate web site, etc. "Allow example.com to track your location?" [Yes] [No] "Allow a1.example.com to store x MB of data locally?" [Yes] [No] Also > The HTML5 Web Storage standard was developed to allow sites to store larger amounts of data (like 5-10 MB) than was previously allowed by cookies (like 4KB). Main difference is that cookies are uploaded to the server…
Re: HTML5 localStorage allows sites to fill up users' hard disks
#137Please sir, may I have some more? This is awesome. I got to 935mb of space used before Google Chrome on Windows 7 64bit crashed dramatically. However, good news, when I restored the tabs it resumed right where it left off filling up my hard drive.
I got to over 2GB and then Chrome crashed (not dramatically, just a tab). Fun fact is that I was not running the "exploit" in Chrome. I was testing it in Opera and I suspect that it was cheating and allocating more and more memory for all the local storage instead of dumping it out to hard drive. So system run out of memory and something had to go.. I still find it funny that it was Chrome :)
Re: HTML5 localStorage allows sites to fill up users' hard disks
#138A root domain www.example.com can utilize upto 10MB of storage while sub-domains count towards that storage limit. Any domain trying to access more will automatically result in a user prompt. An exemption can be made for domains/subdomains that present a valid SSL certificate, the whole idea is to prevent abuse.
Re: HTML5 localStorage allows sites to fill up users' hard disks
#139So. The question I'm asking myself now is how to fix this. Giving .domain.com a shared quota will allow one tumblr or github pages user to monopolize all storage, effectively removing local storage for this kind of scenario (also removing it for the host which is even more annoying). A maybe workable solution would be to only allow creation of new keys for the first-party origin. What I mean is that whatever.example.…
Re: HTML5 localStorage allows sites to fill up users' hard disks
#140Please sir, may I have some more? This is awesome. I got to 935mb of space used before Google Chrome on Windows 7 64bit crashed dramatically. However, good news, when I restored the tabs it resumed right where it left off filling up my hard drive.
But hey, who cares about by-design black swan latency characteristics for real world use cases when the published benchmarks look so great.