{ "id": "117919", "key": "TIMOB-14749", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-12-11T12:53:11.000+0000", "created": "2013-08-02T08:21:42.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "module_webview", "supportTeam" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [ { "id": "31278", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "117910", "key": "TIMOB-14746", "fields": { "summary": "Android: HTML5 app cache (using manifest)", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T19:10:41.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2. Description \r\nSupport for HTML5 app cache (using manifest) for titanium's web view.\r\n\r\nh2. Test case\r\n\r\nThe test case needs a client and a server. Once the files are created, follow these steps:\r\n\r\n1) be sure the device is online, then open the app: you would see 2 images in the webview\r\n2) turn off network on the device\r\n3) hit reload in the app: only one image should be shown (the first) as it is the only one cached\r\n\r\nh2. Test code\r\n\r\nh3. Client side\r\napp.js\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'white'\r\n});\r\n\r\nvar web = Ti.UI.createWebView({\r\n\turl: 'http://example.com/index.html',\r\n\tleft: 0,\r\n\tright: 0,\r\n\ttop: 0,\r\n\tbottom: 100\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n\ttitle: \"Refresh\",\r\n\tbottom: 0\r\n});\r\n\r\nbtn.addEventListener('click', function() {\r\n\tweb.reload();\r\n});\r\n\r\nwin.add(btn);\r\nwin.add(web);\r\nwin.open();\r\n{code}\r\n\r\nh3. Server side\r\n\r\nexample.manifest\r\n{code}\r\nCACHE MANIFEST\r\n# v1 - 2011-08-13\r\nhttp://example.com/index.html\r\nhttp://example.com/image.php\r\n{code}\r\n\r\nindex.html\r\n{code}\r\n\r\n\r\n\r\n\t\r\n\t\r\n\r\n\r\n{code}\r\n\r\nimage.php and imagenocache.php\r\n{code}\r\n