HTML5 web storage: can different websites overwrite each other’s data on a user’s computer?
- by Deepak Mahalingam
I have a few questions regarding the concept of HTML5 storage. I went through the w3c specification, books and tutorials on the same, but still I am a bit unclear about certain concepts:
Assume that I access Website A. Some JavaScript runs in my browser that sets a key value pair, say ('username','deepak'). Then I access Website B which also adds a key,value pair in the localstorage as ('username','mahalingam').
How will they both be differentiated?
Will Website B override the value set by website A in my localstorage?
How can we ensure that a website would not erase all of my localstorage?