search

Home  >  Q&A  >  body text

Can we use the value of localStorage from another domain?

<p>I am storing a value in a domain's local storage. If I access both domains from the same browser, can I retrieve the value from the other domain? </p>
P粉231079976P粉231079976506 days ago604

reply all(1)I'll reply

  • P粉771233336

    P粉7712333362023-08-25 00:13:40

    No, you cannot use local storage of one domain for other domains. Local storage is domain based. You cannot read or write from local storage on a different domain, even on its subdomains. You can use it via an Iframe on a subdomain. Please read this article Cross-domain LocalStorage for detailed explanation.

    Hope it helps you. :)

    reply
    0
  • Cancelreply