Chrome上的硬刷新导致网络::错误\u内容\u长度\u不匹配200(正常)

2024-09-30 06:15:31 发布

您现在位置:Python中文网/ 问答频道 /正文

我不太清楚为什么会发生这种情况,但当我尝试硬刷新我的网站Ctrl-Shift-R(我使用的是Chrome)时,我的控制台出现了一个白色屏幕和以下错误:

https://kaelea-app.herokuapp.com/static/js/kaelea_compiled.js net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)

kaelea_compiled.js是我所有React.js文件的捆绑包。我正在使用Python for Flask作为后端。有人知道为什么每次我硬刷新我的网站时都会出现这个错误吗?这个问题不会在本地发生,它只会在Heroku上托管时发生。是不是我的kaelea_compiled.js太大了

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>Kaelea - Login</title>
    <meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no" />

    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
    <link rel="stylesheet" href="/static/css/login.css?">
  </head>
  <body>
    <div id="kaelea"></div>
    <script src="/static/js/kaelea_compiled.js"></script>
  </body>
</html>

错误消息指向第14行的<script src="/static/js/kaelea_compiled.js"></script>

谢谢你能给我的任何帮助


Tags: httpscom网站html错误jslinkscript

热门问题