且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Chrome 开发工具 - “大小"与“内容"

更新时间:2023-09-30 10:40:28

Size"是线路上的字节数,content"是资源的实际大小.许多因素可以使它们与众不同,包括:

"Size" is the number of bytes on the wire, and "content" is the actual size of the resource. A number of things can make them different, including:

  • 从缓存中提供服务(小或 0大小")
  • 响应标头,包括 cookie(大小"大于内容")
  • 重定向或身份验证请求
  • gzip 压缩(通常大小"比内容"小)

来自文档:

Size 是响应头的组合大小(通常是几个100 个字节)加上响应正文,由服务器提供.内容是资源解码内容的大小.如果资源是从浏览器的缓存而不是通过网络加载的,这字段将包含文本(来自缓存).

Size is the combined size of the response headers (usually a few hundred bytes) plus the response body, as delivered by the server. Content is the size of the resource's decoded content. If the resource was loaded from the browser's cache rather than over the network, this field will contain the text (from cache).