Firebug 以灰色显示一些请求

发布于 2025-01-06 12:30:16 字数 152 浏览 1 评论 0原文

Firebug 显示一些请求为灰色(附有屏幕截图并标记为红色),状态代码为 200,而一些请求显示为黑色,状态代码为 200。两个请求之间有什么区别?

firebug 输出

Firebug shows some requests in Gray(screenshot attached and marked in Red) with status code 200 and some requests shows black with status code 200. What is the difference between two requests?

firebug output

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

淡写薰衣草的香 2025-01-13 12:30:16

灰色请求是从缓存加载的请求,如此处的功能促销中所述:

http://getfirebug.com/network

缓存或不缓存

并非所有网络请求都是相同的 - 其中一些请求是从浏览器缓存而不是网络加载的。 Firebug 为每个请求提供状态代码,以便您可以快速扫描并查看您的网站如何有效地使用缓存来优化页面加载时间。

编辑
至于您对 200 代码和 304 代码的担忧,他们还在其网站上上述引用旁边显示了此图像。

在此处输入图像描述

换句话说,看起来 200 仍然意味着它是从缓存加载的。我确实同意这有点奇怪。我正在尝试揭露更多细节。

编辑2
我假设服务器发送了 200 个代码,但浏览器选择忽略它们并运行缓存的内容(可能是假设它没有改变,或者可能是因为加载的新页面与旧页面位于同一目录中)一?)。

The gray requests are the ones loaded from the cache, as described in a feature-promo here:

http://getfirebug.com/network

Cached or not cached

Not all network requests are equal - some of them are loaded from the browser cache instead of the network. Firebug provides status codes for every request so you can quickly scan and see how effectively your site is using the cache to optimize page load times.

Edit
As for your concern regarding 200-codes and 304 codes, they also display this image on their website next to the above quote.

enter image description here

In other words, it would seem as if 200 still means that it is loaded from the cache. I do agree that it's a bit strange. I'm trying to uncover more details.

Edit 2
I would assume that the server sends out 200-codes, but the browser chooses to ignore them and run the cached content anyway (perhaps by assuming it didn't change, or perhaps because the new page loaded is in the same directory as the old one?).

是伱的 2025-01-13 12:30:16

我引用的是 Jan Honza Odvarko,Firebug 首席开发人员,来自实际的 Firebug Google 群组

1) 以灰色显示的请求(状态码== 304)代表
响应来自浏览器缓存的情况。

2) 以黑色显示的请求(状态码==200)代表
响应来自服务器(未缓存)的情况

3) 请求以灰色显示并带有特殊背景(无论状态如何)
代码)来自BFCache,参见:
http://www.softwareishard.com/博客/firebug/firebug-tip-what-the-heck-is-bfcache/
(Firebug 1.10中已经介绍了背景)

I'm citing Jan Honza Odvarko, firebug lead developer, from the actual firebug google group:

1) Requests displayed in Gray (with status code == 304) represents
cases where the response is coming from the browser cache.

2) Requests displayed in black (with status code == 200) represents
cases where the response is coming from the server (not cached)

3) Requests displayed in gray with special background (whatever status
code) come from BFCache, see:
http://www.softwareishard.com/blog/firebug/firebug-tip-what-the-heck-is-bfcache/
(the background has been introduced in Firebug 1.10)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文