HTTP 206部分内容状态消息是什么意思,我如何完全加载资源? [英] What does the HTTP 206 Partial Content status message mean and how do I fully load resources?
问题描述
我在这样的网站上有一些图片标签.
I have some image tags on a site like this.
<img src="img.png"/>
当我尝试加载它们时,它们只是加载的一半.当我在网络控制台中检查请求时,我看到响应是:
When I try to load them they are only half loading. When I checked the request in the network console I see that the response is:
206部分内容
206 Partial Content
我用它搜索了一下,它说如果在标头中设置了一个范围,它将像这样.但是这些标头实际上在哪里设置?以及如何避免这种情况并加载完整图像?
I googled it and it says that if there is a range set in header, it will be like this. But where are these headers actually set? And how do I avoid this and load the full images?
推荐答案
从user166390的答案到问题为什么Firebug会显示"206 Partial Content".视频加载请求有响应吗?
当客户要求范围时(例如给我前2MB的视频数据"),可以从服务器发送此部分内容代码(206) .
对于分块下载数据至关重要,这可以避免获取未使用的资源. (我很少在线上观看完整的视频.)查看对Range
标头的传出请求.
It is vital for downloading data in chunks which avoids fetching unused resources. (I seldom watch a full video online.) Look at the outgoing request for a Range
header.
这篇关于HTTP 206部分内容状态消息是什么意思,我如何完全加载资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!