Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的网络项目中创建 AMP 页面,我需要在 AMP 页面中显示来自 firebase 的数据。我使用 php 和 JavaScript 在 web 应用程序中显示来自 firebase 的数据。
Amp pages旨在由谷歌缓存,这意味着您需要服务器渲染页面,因为它们将被谷歌机器人自动抓取。
Amp pages
所以,从 php / curl 中点击 firebase api 并在 php 本身中呈现数据并生成 AMP 页面。
如果您使用 java 脚本在客户端上呈现模板,您的 amp 可能无法完全被 google 缓存。