Why does Firebug show a “206 Partial Content” response on a video loading request?

前端 未结 3 742
伪装坚强ぢ
伪装坚强ぢ 2020-12-01 13:08

I have a bunch of html5 video elements, with their preload attribute set to \"auto\". They start loading just fine, but I think there might be a problem with their caching,

3条回答
  •  广开言路
    2020-12-01 13:20

    According to https://httpstatuses.com/206

    "A server MUST NOT generate a multipart response to a request for a single range, since a client that does not request multiple parts might not support multipart responses. However, a server MAY generate a multipart/byteranges payload with only a single body part if multiple ranges were requested and only one range was found to be satisfiable or only one range remained after coalescing. A client that cannot process a multipart/byteranges response MUST NOT generate a request that asks for multiple ranges.

    When a multipart response payload is generated, the server SHOULD send the parts in the same order that the corresponding byte-range-spec appeared in the received Range header field, excluding those ranges that were deemed unsatisfiable or that were coalesced into other ranges. A client that receives a multipart response MUST inspect the Content-Range header field present in each body part in order to determine which range is contained in that body part; a client cannot rely on receiving the same ranges that it requested, nor the same order that it requested."

提交回复
热议问题