Can localStorage data created and saved in one HTML file be used in another HTML file?

I am creating a fully standalone HTML5 application using localStorage.

I successfully saved and restored and processed localStorage data in a single .HTML file. Be that as it may, now when I try to access localSotrage data stored in one .HTML file in another .HTML file, I am not getting success.

Anyway, I created a separate .html file to clear all localStorage and it works fine.

Is this because the localStorage of each web page is separate and cannot be combined or some other error?

+4
source share
1 answer

localStorage , file://, :

Webkit:

file:// https://bugs.webkit.org/show_bug.cgi?id=20701

Mozilla:

Gecko 1.8 : URI . , HTML .

Gecko 1.9, . , , . .

https://developer.mozilla.org/en-US/docs/Same-origin_policy_for_file:_URIs

IE:

(.: localStorage undefined IE)

+2

All Articles