问题
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?
回答1:
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.
回答2:
You may want to take a look at mobione - http://www.genuitec.com/mobile/
回答3:
By using the following method we've actually made a android and iphone app wrapped in phone gap. It's ONLY a web app but you wouldn't know it ;)
http://www.kintek.com.au/web-design-blog/developing-for-the-iphone-and-ipad-by-runing-os-x-10-6-snow-leopard-on-a-pc/
回答4:
I have been building a native html app with iui and Iweb up scripts and installer called Sentenza, I am doing the app to test Sentenza for a review.
But all said there is still lack of easy framworks for a user I am sure it be easy to make a cental js script that as default actions like the button commands for a new page
I think this could be possable to redo the html 5 seen and there is no need for cashing as Sentenza far as I know already enabls this long as your use a ajax call and not a index.html call it works
and its simple I have (a lalala ="Pagename.page" ) or if the page is just small then i can do a ancker command thats also contactlled by JS and css as far as i know
body
div id="home" title="home" selected="true"
div id="link1" title="New Page"
I look like a new page
/div
I am a noob when it comes to all this but if we making these to work and look like native app then I feel this kinda things should be stream lined, I not sure how we could do this but I am sure we could make a simple mainframe framwork that never needs to be opened or edited for the end user they just include the meta and css tags and off they go if your intested in helping me do something like this please email webmaster (at) mokodev (Dot) info I want to make this framework free but also based on the already known IUI and IWeb frameworks, the mainframe would work on any OS as it be just flat css and js files but if we can get it to work i can also try make a windows IU template builder this would enable people get started.
来源:https://stackoverflow.com/questions/1140105/iphone-web-apps-running-as-native-apps