在 Opera Mobile 11 上运行离线 AJAX 应用程序
我正在为具有大量 AJAX 使用量的 Web 应用程序准备项目,该项目应该适用于智能手机。要求之一是应用程序应该能够在没有互联网连接的情况下运行。应用程序启动然后互联网连接丢失的情况相对简单,但是如果用户没有互联网连接,并且想要启动该应用程序怎么办?
Opera Mobile 能够保存页面,即使没有互联网连接也可以加载页面,但问题在于完全 AJAX 应用程序。我检查了 2 个示例: GWT-Ext Showcase 和 ZK Calendar Demo,两者都是在线模式下运行,但离线模式下无法启动(黑屏,无错误) 信息)。我想问题是 Opera 保存了主页本身,但没有保存所需的 JavaScript。今年秋天我有一个问题:
开发人员应该怎样做才能让他的 Web 应用程序在 Opera Mobile 中以离线模式运行? JavaScript 应该如何组织以供 Opera 离线模式下载?
I'm preparing project for web application with large AJAX usage, which should work on Smartphones. One of requirements is that the application should be able to run without internet connection. The scenario when application is launched and then the internet connection is lost is relatively simple, but what in case the user have no internet connections, and wants to launch this application?
Opera Mobile has the ability to save the page, which could be loaded even without internet connections, the problem is however the fully AJAX application. I've checked 2 examples: GWT-Ext Showcase and ZK Calendar Demo, both of them running in online mode, but failed to launch in offline mode (blank screen, with no error message). I suppose the problem is the Opera saved the main page itself, but not the required JavaScript. In this fall I have question:
What should the developer do to make his web application running in Opera Mobile in offline mode? How should the JavaScript be organized to be downloaded by Opera for offline mode?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该指定缓存清单文件。
您也可以将所有 javascript 粘贴到主 html 页面中(内联)(不过对于图像来说更困难)
You should specify a cache manifest file.
You could also just paste all the javascript into the main html page (inline) (more difficult to do with images though)