Firefox 加载页面两次(或 3 次),在 firebug 中显示为 Abort 200
我遇到了一种奇怪的情况,Firefox 加载页面 2 或 3 次只是为了显示一次。我已经研究了一些明显的事情,例如空图像标签等,但无法弄清楚。
使用 firebug,我可以快速连续地看到,在加载页面的其他元素之前,浏览器先收到 200 Aborted,然后收到 200 OK。查看我的服务器日志,我只看到 200 OK,没有任何类似于中止的信息。有谁知道为什么会发生这种情况?只需单击链接即可发生这种情况,发生这种情况时不会使用 ajax。这会导致额外的服务器负载,并且还会导致非幂等操作的活动增加一倍。
I am experiencing a strange situation where Firefox is loading a page 2 or 3 times just to show it once. I have looked into obvious things like empty image tags and such, but can't figure it out.
Using firebug, I can see in quick succession, the browser is getting a 200 Aborted and then the 200 OK, before loading the other elements of the page. Looking at my server logs, I only see the 200 OKs, nothing that is like an abort. Does anyone know why this happens? It happens with simple link clicks, no ajax in play when this occurs. This is causing extra server load, and also double activity for operations that are not idempotent.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
Firebug 导致 @fontface 字体文件的第二个 HTTP GET 请求
http://code.google.com/p/fbug/issues/detail?id=4649
我也遇到了同样的问题,但是谁的 Firebuq buq :)
Firebug causes a second HTTP GET request of @fontface font-files
http://code.google.com/p/fbug/issues/detail?id=4649
I had the same issue but that whose Firebuq buq :)
我见过的唯一与此接近的事情是糟糕的 .htaccess 重定向。如果您使用的是 Linux 服务器,请检查该文件所在文件夹中的所有 .htaccess 文件、您链接到的文件夹以及所有父文件夹。
The only thing I have seen close to this is bad .htaccess redirects. If you are using a linux server, check all of the .htaccess files in the folder that the file is in, the folders that you are linking to and also all the parent folders.
当您调用 XMLHTTPRequest 对象上的 abort() 方法时,会发送 200 Abort。也许您应该发布一些相关的 JS 代码或查找调用 abort() 的情况。
200 Abort is sent when you call the abort() method on XMLHTTPRequest objects. Maybe you should post some related JS code or look for cases where abort() is being called.
该问题与 firebug 完全相关。尝试使用 Firefox 的内置 Web 控制台并启用“网络”选项。
The issue is completely related to firebug. Try using Firefox's in-built Web Console with "Net" option enabled.
就我而言,存在阻止 https: 传输的网络问题(SSL 会话不受信任)。一旦凭据被接受,传输就会从“已中止”更改为“成功”。
In my case there was a network issue blocking the https: transfers (SSL session not trusted). Once the credentials were accepted, the transfers changed from ABORTED to Success.
检查 img 标签中是否没有空的 src 属性。
Check that there arent empty src properties in img tags.