Ashwin
Ashwin

Reputation: 13537

html5 localstorage accessiblity

In html5 if I create an new local storage key called mykey from a website www.a.com, will I be able to access mykey from another site, say www.b.com ?
                                                     Can any website access the key/value pairs created by other website? Please explain in detail. Even links will do fine.
I created two jsp files both of them using the same local storage and deployed them in jboss as different files. Now both the domains i.e localhost:8080/store1/local_storage.jsp and localhost:8080/store2/local_storage1.jsp are able to access the same key/value pair. How is that possible?

Upvotes: 0

Views: 304

Answers (1)

f2lollpll
f2lollpll

Reputation: 1007

No.

Just like cookies are these objects only accessible from the domain that created them, for security reasons.

If you want to pass data from one domain to another I can recommend a form that posts to another site or put the data in a query string :)

Upvotes: 1

Related Questions