I want to build such app in which webview loads local index.html and resources which this index.html uses like css,js are fetched from remote server.Now I want to leverage html5 offline application feature.How can I do?
For details. I try loading remote content in webview like
webView = Ti.UI.createWebView({ enableZoomControls: false, url: "http://192.168.1.108", backgroundColor: 'transparent', bottom: 0, disableBounce: true });then the offline application feature can work well like browsers. (My index.html in 192.168.1.108 have html5's manifest attribute and I have a .manifest file in site root directory.)
But as we know, remote content cannot call titanium apis. > You cannot use any Titanium statements within HTML content loaded from a remote host. see doc: http://docs.appcelerator.com/titanium/3.0/#!/guide/Communication_Between_WebViews_and_Titanium
So I need a local entry which loads css and js from remote in order to call titanium apis.
webView = Ti.UI.createWebView({ enableZoomControls: false, url: "/HTML/index.html", backgroundColor: 'transparent', bottom: 0, disableBounce: true });Now how can I leverage html5 offline app capacity in this situation?