I'm aware that local storage uses key value pairs to store data, but what if two websites use the same key to store data? how do they not overwrite one another when data has been inputted?
Asked
Active
Viewed 564 times
2 Answers
0
Local storage is bound to their origin. So there is an "own" local storage for every domain (and protocol).

antesoles
- 683
- 6
- 21
0
The local storage and the session storage are unique peer protocol://host:port
so you can have keys with the same name on different domains.

Damian Galletini
- 161
- 7