Why do two web pages have different localStorage? How can I fix this?

前端 未结 1 1318
旧时难觅i
旧时难觅i 2020-12-06 06:27

I\'m trying to pass a value from one page to another using localStorage. Both pages use a common JS file to get/set values from localStorage. This page sets the value approp

相关标签:
1条回答
  • 2020-12-06 06:28

    The localStorage isin't per page, it's by domain. However like @bfavaretto mentionned, www.demandbaselabs.com and demandbaselabs.com aren't considered as the same domain.

    Have a look at this answer to see how you can exchange client-side stored data between domains.

    0 讨论(0)
提交回复
热议问题