Storing iPhone apps locally with data URLs

“Some people think that you need net access to run web-based applications on your iPhone. Not so,” W. Clawpaws reports for Life with Lunchhooks.

“By using a data: URL, the entire page content is all in the URL. If save a bookmark for this URL, you can access this little JavaScript-based app even in airplane mode,” Clawpaws reports.

“By putting images inline using data: URLs, you can create pretty rich pages and store them locally. I created a 363,488 byte URL for my home page (complete with images) and it loaded just fine on my iPhone,” Clawpaws reports.

Full article, with sample app and code examples, here.

[Thanks to MacDailyNews Reader “JMS in Texas” for the heads up.]


  1. Woah, now this is a cool idea. I need this for some stuff here at work that I want to function even if network access is unavailable.

    As for the people giving MDN grief about all the iPhone stuff, please remember that His Steveness himself said the iPhone is running a slimmed version of Mac OS X. And, if you had used one, you would realize that the iPhone is far more than just a phone with internet. It really is a Mac in your hand.

  2. Woody: And, if you had used one, you would realize that the iPhone is far more than just a phone with internet. It really is a Mac in your hand.

    At the moment, iPhone is just a phone with the Internet plus iPod. Sure, the UI is a breakthrough and all that, but iPhone is not a Mac in your hand. Not yet anyway. Its true potential has not been brought out yet. There is no doubt that Apple has a grand plan for iPhone for the future, but there is no need to jump ahead and proclaim what iPhone currently is not.

  3. If you used an iPhone you would KNOW that it is a mac in your hand. It is not just phone, internet and ipod. It is iCal that syncs, it is Safari ( although a little crash prone) and All with OSX interface and deep access to settings. And that is not including the obvious features they will bring in with Leopard (the to do and notes features of the new and possibly the realization of “Home on A Mac”.

    Besides if you look at what is being developed or have played with something like Teleknisis (which is in such a baby Alpha stage that it hasn’t even reached a tenth of its potential) then the iphone becomes a “thin client”-like device with access back to your mac.At current you can play media, browse files and open them on either the iphone or the mac. Launch applications, run applescripts. And this has all been developed within weeks and without access to the actual core of the OS.

    The iPhone is not just another smartphone it is a computer running OSX. That is a fact. Not conjecture. Not a pipe dream.

    The potential of this device is limited only by certain hardware realities in the current deviec and the imagination of those that use it (and/or develop for it).

Reader Feedback

This site uses Akismet to reduce spam. Learn how your comment data is processed.