本文介绍了Chrome开发工具 - “尺寸” vs“内容”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Chrome开发工具的网络选项卡中查看有关样式表的信息时,其中一列指定了大小和内容: ://i.stack.imgur.com/oEwmR.pngalt =突出显示大小/内容列的开发工具的屏幕快照>
任何人都可以揭示这两个数字之间的区别?在一些页面上,这些数字是相近的,而其他的则相差很大。
解决方案
在线上,内容是资源的实际大小。一些事情可以使它们不同,包括:
- 由缓存(小或0大小)提供
- 响应头,包括cookie(大于content的大小)
- 重定向或身份验证请求
- gzip压缩(比内容更小的尺寸,通常)
:
When viewing information about stylesheets in the Network tab of Chrome's dev tools, one column specifies both "size" and "content":
Can anybody shed light on the difference between these two numbers? On some pages the numbers are close and others they are different by a considerable amount.
解决方案
"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:
- Being served from cache (small or 0 "size")
- Response headers, including cookies (larger "size" than "content")
- Redirects or authentication requests
- gzip compression (smaller "size" than "content", usually)
这篇关于Chrome开发工具 - “尺寸” vs“内容”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!