Perhaps this problem indicates a real limitation in the same-origin policy as 
root for browser data. In a somewhat related point at TPAC for example I 
pointed out that the value of using IndexedDB for media storage - e.g. GBs of 
music or videos - will be severely limited if I can't switch my web-based media 
player application from one origin to another.

Perhaps what we need (and I am ducking as I say this) is a meta tag for web 
pages, e.g.
<meta name="previously-known-as" content="http://olddomain.com:80";>
or
<meta name="same-as" content="http://olddomain.com:80";>

This could then be used by the browser to allow the user (always in control of 
such decisions) to grant the new origin to take ownership of (or at least gain 
read/write access to) any existing data of the old origin.

Thanks,
Bryan Sullivan

From: [email protected] [mailto:[email protected]]
Sent: Tuesday, January 08, 2013 11:37 AM
To: Todd Blanchard
Cc: [email protected]
Subject: Re: [IndexedDB] How to recover data from IndexedDB if the origin 
domain don't exist anymore?

Hacky, but nice trick (really, I like it :-) ). My question was more related 
about looking for a solution available for non-techies users, or give a warning 
about a (valid?) corner-case on the specification.

(I'm going to add an issue on my project tracker to remind me to develop your 
idea, it's really simple and useful :-) )

2013/1/8 Todd Blanchard 
<[email protected]<mailto:[email protected]>>
As a practical matter, you could just make an entry in your /etc/hosts mapping 
the domain to localhost and write a web page that dumps the indexeddb as json.  
Serve that from your local web server and hit it with your browser.


On Jan 8, 2013, at 7:08 AM, [email protected]<mailto:[email protected]> wrote:


I have been looking on Internet and reading the spec but didn't be able to get 
at answer.

Let's see the next situation: I've developed a webapp that use IndexedDB to 
store personal data. It's pure client-side and server-less, being all the 
content of the webapp just static files and served with static web servers and 
CDNs, so all the user data is stored on IndexedDB on the user's computer and 
not any other place (there's no a "database server" that could be accesed in 
any form in any place at all).

I know that IndexedDB use a same-domain policy to isolate the access to the 
data, but maybe one day the domain of my webapp could dissapear for any reason 
(bankrupcy, forgot to pay the domain renoval, legal issues, system fail... 
whatever) so I can't be able to access to the page to download the webapp that 
would allow to me to access to MY data in MY computer.

At this moment, I've developed a way to make backups of the content of the 
IndexedDB so it could be "imported" on the IndexedDB of other domain (and also 
on other computer if neccessary) but I find it bad for usability, so my 
question is, there's a way so an IndexedDB database could be shared by several 
domain unrelated webapps? Maybe defining in some way a "fake" origin for the 
IndexedDB object that all the webapps could have in common (in some way like a 
"magic word"), or the specification doesn't allow this possiblity at this 
moment? If so, how I could be able to do it?

Greetings and thank you very much, Jesús Leganés Combarro.

Jesús Leganés Combarro
[email protected]<mailto:[email protected]>
http://github.com/piranna/ShareIt


--
"Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton de 
sitios diferentes, simplemente escribe un sistema operativo Unix."
- Linus Tordvals, creador del sistema operativo Linux




--
"Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton de 
sitios diferentes, simplemente escribe un sistema operativo Unix."
- Linus Tordvals, creador del sistema operativo Linux

Reply via email to