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.]

24 Comments

  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 Mail.app. 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 mail.app 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).

  4. Running OS X doesn’t not make iPhone a Mac. You don’t even have a Finder on iPhone for Pete’s sake.

    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.

    Bingo! You need something like Telekinesis to browse files, launch AppleScript and so on. You are proving my point that iPhone is not yet a Mac. A Mac does all that without a third party app.

    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).

    Exactly my point. Read my post again. This is what I wrote: Not yet anyway. Its true potential<b> has not been brought out yet. There is <b>no doubt that Apple has a grand plan for iPhone for the future, … As you see, I never said anything about iPhone staying like what it is forever. I just disagree with you that iPhone is a Mac now. It’s not, regardless of what iPhone may morph to in the future.

  5. Thanks a lot for the interesting information just about this topic! This is obviously that the paper writing service can present the a href=”http://www.exclusivepapers.com”>essay writing</a>. Moreover, there’s a great chance to buy a term paper and a href=”http://www.exclusivepapers.com”>custom essays</a> just about this topic.

Reader Feedback

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