Jenny Mok Jenny Mok - 21 days ago 6
AngularJS Question

localstorage or cookie key name in client side

I saw some code in github set localstorage key like 'user' in the localstorage. I think it should be at least $domain_name + 'user', because that might clash with other app. Am I right?

Answer

No. Each origin has it's own namespace. One origin do not have access to other origins' localStorage data.

Comments