Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 428
Jaish Mathews Avatar asked Nov 07 '14 06:11

Jaish Mathews


People also ask

Does local storage persist across different browsers?

The localStorage read-only property of the window interface allows you to access a Storage object for the Document 's origin; the stored data is saved across browser sessions.

Does HTML5 support local storage?

With HTML5 local storage, a larger amount of data (initially, 5MB per application per browser) can be persistently cached client-side, which provides an alternative to server downloads. A web application can achieve better performance and provide a better user experience if it uses this local storage.

Is local storage accessible on other websites?

LocalStorage is like cookies: you can't access one other website's variables. It's designed to avoid malicious websites to access other website's personal data. Save this answer.

Is local storage browser specific?

Similar to cookies, local storage is designed to a dependable, persistent browser data storage on the clientside. However, it is not permanent. The data stored with it is specific to the user and their browser. While other web apps are unable to read from it.

What is true with local storage in HTML5?

HTML5 local storage properties are never sent to any server - unless you explicitly copy them out of the local storage and appends them to an AJAX request. HTML5 local storage can store somewhere between 2MB and 10MB data in the browser (per origin - domain name).


1 Answers

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.

like image 98
jfriend00 Avatar answered Oct 21 '22 01:10

jfriend00