开发者

Javascript stops working with HTML5 manifest file

So I cre开发者_C百科ated this iphone webapp using an HTML5 manifest file to be able to open it offline. The problem is that the 2 javascript files I load stop working as soon as I openthe appin fullscreen mode twice. Let me explain:

  • it works when you reload it in ios safari
  • in webapp mode it works fine the first time you open it
  • the 2e time you open it the javascript loads but does not work. (it intercepts clicks and does that, only the next page doesn't load with ajax the 2e time)

any idea how this is possible. Must i somehow "reset" the javascript file? I use jquery (first file) and my js file.


When you are loading the second page with ajax, the url for that page must be included in the cache.manifest.

You probably also want to setup your phone to go through a proxy like Charles http://www.charlesproxy.com/ This will let you see any files that are loaded by the site.

We ran into issues where files were being loaded with cache-busters at the end of the url. Since the cache-busters changed the url, they didn't exactly match what was in the cache.manifest.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜