local storage - Javascript localStorage and domains -
because ipad/iphone doesn't support cookies third party sites, want store values in localstorage. example on domaina might be:
<script src="http://domainb/something.js"></script>
this script on domainb can access window.localstorage , works great. values stored in domaina because that's document's location.
if put script inside iframe source on domainb, works, i'm trying avoid frames. question is: there way get/set values in localstorage on remote domain such they'll there when visit domainb @ later time?
this isn't possible without iframe workaround.
the ability access same localstorage object multiple domains violate same origin policy,and spec:
user agents must raise security_err exception whenever of members of storage object returned localstorage attribute accessed scripts effective script origin not same origin of document of window object on localstorage attribute accessed.
http://dev.w3.org/html5/webstorage/#security-localstorage
if wasn't iphone, suggest flash solution. localstorage, think out of luck until implement cross-domain policy.
Comments
Post a Comment