Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone web apps running as native apps

The browser on the iPhone is capable of using advanced web technologies introduced in HTML5. One of these is the app cache that allows web pages to run on the client, from the cache, without a connection to the internet. Together with Local Storage you can also save data permanently "in" the page.

My question is, would it then be possible to make a website that when visited and set as a web clip (bookmark on the home screen), could be accessed again, at any moment. Using HTML5, Javascript and css, you can make some very good apps and at the same time avoid the pricey developer fee, the harsh app approval and the single platform development platform?

Or am I just dreaming?

like image 580
Henrik Hansen Avatar asked Jul 16 '09 20:07

Henrik Hansen


1 Answers

Yes, what you describe is certainly possible. You can take advantage of Apple's support for the HTML5 app cache by creating a manifest file indicating which resources are to be cached, and specifying that file from within the HTML page of your web app. Details on how to do this are in Apple's documentation.

Update: I have tried this on my own web app, and it works. You have to make sure that the manifest file is served as type text/cache-manifest, like it says in the documentation. Also, I don't know how long Safari is guaranteed to keep the files cached. I have found that manually clearing Safari's cache will clear the cached web app files as well, even for a web app link saved on the device's home screen.

like image 53
Karl von L Avatar answered Nov 10 '22 00:11

Karl von L