Jenny Mok Jenny Mok - 1 year ago 69
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 Source

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