gpt4 book ai didi

wordpress - 将 WordPress 网站转换为渐进式 Web 应用程序

转载 作者:行者123 更新时间:2023-12-02 23:42:03 25 4
gpt4 key购买 nike

我正在构建一个渐进式 Web 应用程序,但到目前为止,在线文档和支持非常少。我在这封电子邮件中列出了我的所有问题。

  1. Service Worker API(离线模式)当前支持什么台式机?我编写了一个在离线模式下工作的小应用程序移动版(Android-Chrome),但不适用于我的桌面版(Chrome 42)。我们需要为此配置开发环境所以我们需要知道我们需要什么来测试我们的应用程序。它不起作用IOS-Safari/Chrome 甚至。

  2. 服务工作广泛使用缓存,并且有一个非常好的 在 Dekstop 上调试或取消注册 Service Worker 内部结构的方法 Chrome ;但如果我在移动设备上运行我的应用程序,我将如何删除 服务工作线程缓存?

  3. 如果我有一个响应式应用程序(WordPress 网站)并且需要 将其转换为 PWA;我需要重写应用程序吗 手机版的 RestAPI 又来了吗? (阅读 PWA 的 App Shell)。在 PWA,应用程序外壳与数据分离,但在 CMS 中,例如 WordPress 数据与 UI 并不分离。

我一直在寻找这些答案,但未能找到任何适当的支持。

最佳答案

What is the current support of Service Worker API (Offline Mode) for desktops? I wrote a small app which worked in offline mode for mobile (Android-Chrome) but not for my Desktop (Chrome 42). We need to configure development environment for this so we need to know what will we be needing to test our apps. It doesn't work on IOS-Safari/Chrome even.

Safari 目前不支持 Service Worker,但 it should work in Chrome 42尽管您应该考虑更新您的浏览器。不管怎样,你可以在不同的地方检查当前的技术水平:

有关软件的更多信息:

The service work uses caches extensively and there is a very good way to debug or unregistered service worker internals on Dekstop Chrome; but if I run my application on Mobile how would I remove service worker cache?

您需要debug Chrome for Android from Desktop Chrome .

无论如何,尽管没有简单的方法来清除离线缓存,但 URL chrome://serviceworkers-internals 在 Android 版 Chrome 上可用。

If I have a responsive application (A WordPress site) and need to convert it into PWA; would I need to rewrite the application with RestAPI for mobile version all again? (Read App Shell of PWA). In PWA, application shell is separate from data however in CMS like WordPress data is not separate from the UI.

没有。实际上,WP 有一个非常好的架构来将内容与主题解耦。 问题是在服务器上运行,但您不需要在客户端上运行您的网站才能成为 PWA。 Mozilla 正在支持 suite of WP plugins帮助您的 WordPress 安装进步:

它们都是非常年轻的插件,但您可以在 GitHub 上跟踪它们并根据需要做出贡献!

关于wordpress - 将 WordPress 网站转换为渐进式 Web 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36565068/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com