Question

I don't know if I googled it correctly but I could not find the answer for my question.

I'd like to know if it's possible to code a html5 with javascript (maybe jquery mobile for the UI) and css without using "native compilers/builders" like sencha touch or phonegap and store the page locally (using file:// protocol).

E.g: Let's say that I want to build a simple HTML5 calculator. I don't want any server-side processing, I just want some html buttons to call javascript functions to perform client side only operations. If I make such page, let's call it calc.html and download it to the mobile (via usb/http download), can I open this calc.html with the internal browser and use the calculator? Or do I have to compile/build this calc.html into a Webview (for Android) or something like it to get it done? Would this work for Android, IPhone, Windows Phone and others with localStorage/sessionStorage?

Was it helpful?

Solution

You want an Offline Web Application.

This article seems to explains step by step how to do this.

http://diveintohtml5.info/offline.html

Creating a website like this, will allow you to bookmark it and have a shortcut icon in the phone's dashboard that will allow you to load your page in the browser for those cases where you don't have a data connection. In the case where the phone has a data connection, it will load the manifest to check if there are any new files to update the application. I don't think there is a way to make it truly offline though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top