Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cross domain reading data from browser storage

I am trying to store data with a unique ID into the browser's storage, from say a.com using jStorage and jQuery. I am then trying to read the data using the unique ID from, say b.com. But jStorage.get('UniqueID') is not working, and it's not showing the desired output.

Can anyone help me with reading browser storage cross-domain?

like image 949
user1504657 Avatar asked Oct 22 '12 15:10

user1504657


People also ask

Can subdomain and cross domain share cookie information?

Now problem was there is as per www protocol cookies and session information is not directly available between subdomain and cross domain as per privacy of data. So, www.example.com and customer.example.com even they belong to same domain example.com they can't read each other cookie information or local storage.

Does HTML5 web storage support cross domain data sharing?

As for now, standard HTML5 Web Storage (a.k.a Local Storage) doesn't now allow cross domain data sharing. This may be a big problem in an organization which have a lot of sub domains and wants to share client data between them.

Why do you make localStorage available per domain?

Having LocalStorage available per domain prevents malicious JavaScript hosted on other websites from manipulating or reading our client data that's used by our domain. Each domain can store up to 5MB of data in LocalStorage. Also, our data isn't sent to the server when an HTTP request is made. Data in LocalStorage has no expiration time.

How to store global encrypted session information and cross domain communication?

That’s possible with using 3rd party domain to store global encrypted session information and cross domain communication mechanism. For storage we can use either cookies and html5 localStorage and for communication we will look at using postMessage.


1 Answers

This article has some information related to cross-domain storage. It offers "the basic technique of using an iframe to access another domain's localStorage object."

like image 63
Whymarrh Avatar answered Sep 25 '22 06:09

Whymarrh