Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
368 views
in Technique[技术] by (71.8m points)

html - html5 Local Storage Across Different Browsers

I did my local storage using Chrome and then try to access it through Firefox. But it’s not there. Can somebody clarify that is it a valid test case to store and retrieve HTML5 local storage using different browsers? As per my understanding HTML local storage path is browser specific. So I assume that you need to use same browsers for both storage and retrieve belongs to a specific KEY. Is it a correct statement?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Local Storage is "local" in that exact browser and ONLY in that browser. To retrieve something stored in Local Storage, you must use the same browser, the same key and retrieve it from a page in the same origin (e.g. domain).

If you want something available across multiple browsers, then you have to identify the user somehow (usually a user login) and then you need to store the data on a server somewhere so that the data can be served to the same user across multiple browsers.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...