Firebase 托管空缓存和硬重新加载时出现页面未找到错误

Ank*_*ari 2 firebase polymer firebase-hosting

Firebase 托管工作正常!但这在两种情况下显示找不到页面(附有图像)页面:

  1. 在我们部署到 Firebase 托管后,需要 2-3 次刷新才能获得预期的页面,否则会显示“找不到页面”页面。
  2. 当我们清空缓存并硬重新加载时,它会显示“找不到页面”页面。

注意:该页面是使用 Polymer Web Components 设计的。

检查此链接 - https://yesitesapp.com/products

请提出建议 - 如果需要任何配置或任何设置才能正常运行 Firebase 托管。

在此输入图像描述

abr*_*ham 13

您安装了一个 Service Worker,它可以预先缓存/products然后服务器来自客户端缓存的路径。

您必须修改配置才能为应用程序使用的所有路径firebase.json提供文件。index.htmlFirebase 文档有一个示例,应该看起来像这样,其中显示处理所有路径 ( **) with index.html

"hosting": {
  "rewrites": [ {
    "source": "**",
    "destination": "/index.html"
  } ]
}
Run Code Online (Sandbox Code Playgroud)