html5 Local Storage Across Different Browsers

后端 未结 2 1454
忘了有多久
忘了有多久 2020-12-10 04:51

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 HT

2条回答
  •  隐瞒了意图╮
    2020-12-10 05:22

    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.

提交回复
热议问题