Filed under: Analysis / Opinion, Hacks, iPhone
Saving iPhone applications inside data URLs
This is really basically the same theory as the iPhone bookmarklets Mat posted earlier (squeezing content into a URL), but it's a little less about function and a little more about storage. Currently, the iPhone doesn't allow you to save actual files locally, but it does allow you save URLs, so the idea here is to save entire applications (or other HTML content) in the form of a data URL.It's a pretty wonky hack, but it works-- you can convert whole HTML pages, or even applications, depending on the URL length the iPhone's bookmarks allow, into data URLs (with the Perl script on that page if you don't want to do it manually), and then those data URLs can be loaded into MobileSafari on the iPhone, even in Airplane mode. The suggestion is made that this could allow persistent storage for web applications on the iPhone, but wouldn't that require allowing the HTML page to write to and read from the iPhone's bookmarks? Is that possible?
At any rate, maybe it's a good thing, for a little while at least, that Apple didn't release a "real" SDK for the iPhone. Web programmers are making their code do all kinds of flips and tricks to get every bit of access they can on the iPhone. People have been talking about browser-based, OS independent applications for years-- maybe Apple's insistence that iPhone developers go through the browser will bring about that world sooner than we thought.
[via DF]


![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
Tt said 6:14PM on 7-19-2007
The problem with this of course is that Safari is prone to unexpected crashes.
I've been using a different method which is to email myself complete archives of a page and viewing them in the mail app. This works quite well and nothing is lost when the webkit decides to burp.
Reply
required said 7:08PM on 7-19-2007
"the network is the computer" - sun microsystems
Reply
required said 7:11PM on 7-19-2007
make that John Gage
http://en.wikipedia.org/wiki/John_Gage
Reply
MacBookOwner said 8:19PM on 7-19-2007
Tt,
the problem with emailing is you can't use landscape mode in Mail.
Of course...all this would be unnecessary if Apple would just give us PDF support in iTunes or iPhoto..or even better..a new iReader :D
Reply
JD said 10:58PM on 7-19-2007
So having to launch safari then go to my bookmarks to run an app is a good thing?
Reply
Frank said 11:45PM on 7-19-2007
is this the same idea as this:
http://tinyurl.com/29d39m ?
because while this is for PDFs, and not apps, it works brilliantly.
Reply
Pelle said 11:59AM on 7-20-2007
I've managed to encode Apple's Puzzle game in a data url. You can install it on your iphone by going here and following the instructions:
http://s3.amazonaws.com/stakeventures.com/puzzler.html
Reply
Greg said 1:56PM on 7-22-2007
I came across a great application for converting files into data URLs called Filemark Maker. Its at http://www.insanelygreattees.com/news/?p=51
Reply