This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
我已经弄清楚了。
这种行为的原因是 JavaScript 代码,在页面加载后被调用。此代码实现了页面某些部分的深度链接。
对此要小心。
谢谢。
I've figured it out.
The reason of such a behavior was a JavaScript code, being called after page load. This code implements deep-linking for some parts of the page.
Be careful about this.
Thanks.
我遇到了类似的问题,在我们的例子中,如果 pjax 没有在 6 秒内完成,它是一个有问题的 pjax 代码,超时时间为 6 秒,导致一个额外的请求(即一个额外的常规 HTML 请求)。
I faced similar issue and in our case it was an offending pjax code with 6s of timeout resulting in one extra request (i.e. one extra regular HTML request) if pjax didn't complete in 6s.
另一件需要检查的事情是您是否将 PostCSS 列为
package.json
中的依赖项。如果您这样做,并且您没有有postcss.config.json
文件,请修复该问题。最基本的文件似乎是重新启动服务器、重新加载页面并检查服务器日志。应该只有一个请求被报告为已处理。
参加聚会已经很晚了,但希望这对某人有帮助。我暂时被一个琐碎的 Rails 6.1.4.1 应用程序所看到的日志所困扰。
Another thing to check is whether you have PostCSS listed as a dependency in your
package.json
. If you do, and you don't have apostcss.config.json
file, fix that. The most basic file appears to beRestart your server, reload your page, and check the server log. There should be only one request being reported as processed.
Very late to the party, but hope this helps someone. I was temporarily stumped in a trivial Rails 6.1.4.1 app seeing the log.