代码之家  ›  专栏  ›  技术社区  ›  Ankit Maheshwari

空缓存和硬重新加载时找不到Firebase宿主页错误

  •  0
  • Ankit Maheshwari  · 技术社区  · 6 年前

    firebase主机运行良好! 但是这个显示了 找不到页 (附图片)两种情况下的页面:

    1. 在我们部署到firebase宿主之后,需要2-3次刷新以获得预期的页面,否则它将显示未找到的页面。
    2. 当我们清空缓存并重新加载时,它会显示 找不到页 第页。

    注意:页面是使用聚合物网络组件设计的。

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

    请建议-如果需要任何配置或设置才能正常运行firebase宿主。

    enter image description here

    1 回复  |  直到 6 年前
        1
  •  1
  •   abraham    6 年前

    你安装了一个服务人员 /products 然后从客户端缓存中服务器该路径。

    你必须修改你的 firebase.json 配置为您的 index.html 你的应用程序使用的所有路径的文件。firebase文档有一个 example 应该是这样的,上面写着处理所有路径( ** )与 index.html索引 .

    "hosting": {
      "rewrites": [ {
        "source": "**",
        "destination": "/index.html"
      } ]
    }