如何缓存动态 iPhone Web 应用程序以便离线工作?

发布于 2024-09-29 03:27:17 字数 168 浏览 0 评论 0原文

我有一个用 PHP 编写并使用 WebApp.Net 框架的 iPhone Web 应用程序。我想让这个应用程序也可以离线工作。据我了解,我无法使用 HTML5 的清单标签,因为我的文件是 PHP 而不是 html。或者至少它不起作用,我不知道我的方向是否正确。

有谁知道我该怎么做?

谢谢

I am having an iPhone web app written in PHP and using the WebApp.Net framework. I would like to make this application work offline as well. As I understood I can not use the manifest tag of HTML5 because my files are PHP and not html. Or at least it didn't work with it and I don't know if I am in the right direction.

Does anyone have any idea for how can I do it?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少跟Wǒ拽 2024-10-06 03:27:17

您可以缓存任何静态文件,无论它是如何生成的。您必须通过清单缓存所有 html、javascript 和 css(还有图形,如果它们很小)。使用LocalStorage存储离线模式下需要的JSON请求。使用在线模式将您处理的数据同步到 LocalStorage。

您还没有说明您的应用程序的用途以及在离线模式下应该做什么,但通常我目前看到的唯一方法是完全 AJAX 化所有可在离线模式下工作的功能。

您可以浏览 StackOverflow 来查找标签 html5+javascript 进行一般性讨论,或者 html+javascript+mobile 了解更多具体信息。

You can cache any static file, no matter how it is generated. You must cache via manifest all your html, javascript and css (and graphics also, if they are small). Use LocalStorage to store JSON requests needed in offline mode. Use online mode to synchronize data you work on into LocalStorage.

You haven't stated what is your application for and what should be done in offline mode, but generally the only way I see as for now is to fully AJAXise all functionality that will work in offline.

You can browse StackOverflow for tags html5+javascript for general discrussions, or html+javascript+mobile for more specific.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文