Joseph James Shenton Joseph James Shenton - 1 year ago 101
Javascript Question

Can two folders share the same localStorage?

I am making an app that changes settings on my other app; they are both hosted on the same site just in different folders. Is there a way to make it so they both share the same localStorage?

Answer Source

localStorage is domain based. All pages with same domain share single localStorage.

Also to share localStorage, both pages need to have the same port and protocol like https.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download