Javascript 带有PhoneGap和Jquery mobile的AppCache

Javascript 带有PhoneGap和Jquery mobile的AppCache,javascript,jquery,jquery-mobile,cordova,html5-appcache,Javascript,Jquery,Jquery Mobile,Cordova,Html5 Appcache,我最近将我的appname.appcache内容设置为:缓存清单 # 2010-02-10 v1 CACHE: index.html test1.html test2.html # many more project root html files #stylesheets css/main.css css/normalize.css css/themes2/jquery.mobile-1.0.min.css #gameMessages some-folder/name.html #man

我最近将我的appname.appcache内容设置为:缓存清单

# 2010-02-10 v1

CACHE:
index.html
test1.html
test2.html
# many more project root html files

#stylesheets
css/main.css
css/normalize.css
css/themes2/jquery.mobile-1.0.min.css

#gameMessages
some-folder/name.html
#many more like this

#js
js/vendor/jquery.mobile-1.0.1.min.js
# a few more files
现在,当我导航到index.html时,google chrome中出现了一个错误:

在phonegap的config.xml文件中:

那么,这是否解决了在真正的移动设备上运行时的问题呢。为什么我会在Chrome上出现这个错误呢。在Firefox上,通过请求文件存储权限,它运行良好


appCache是否提高了使用phonegap构建的应用程序的性能?。缓存硬件上已有的资源是否会加快速度?我知道缓存上的内容比硬盘上的内容处理得更快。因此,在本例中使用appCache工具

我也遇到了同样的错误,但在我的例子中,这是因为我在http上运行我的文件,并且缓存了https上的资源,因此不在同一个源上。
如果你有这样的问题,你可以研究一下。

这不是一个真正的答案,但感谢你为我指出了解决我自己问题的正确方向。在这里发布,以防它曾经帮助有类似问题的人-我试图添加一个评论,但文字太长

我一直在为我正在构建的应用程序的web版本使用缓存清单,但在构建PhoneGap时没有考虑它。当您询问appCache是否提高了使用phonegap构建的应用程序的性能时?至少对我来说,响亮的答案是肯定的

我使用的是放大弹出加载ajax类型的弹出窗口,即使手机/设备处于脱机状态,所有弹出窗口都可以正常工作,除了弹出内容包含一个RoyalSlider库时——这些成功加载ajax内容,我可以说这要感谢放大弹出非常有用的ajax回调,但它们不会继续将其添加到DOM中。我仍然不知道这到底是为什么,我猜问题出在RoyalSlider的代码中的某个地方,也许是在寻找它认为是在线的资源?但无论如何,实现缓存清单已经完全解决了我的问题。谢谢

Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. file:///home/username/Desktop/project-name/test1.html

XMLHttpRequest cannot load file:///home/user-name/Desktop/project-name/test1.html. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
<access origin="*"/>