Byte serving - Wikipedia

submited by
Style Pass
2021-07-18 14:30:06

Byte serving (other names: RFC 7233 says the client makes Range Requests when it makes a partial content request; Clients make range requests;[1][2] Byte Range Serving; Page on demand[3]) is the process of sending only a portion of an HTTP/1.1 message from a server to a client. Byte serving begins when an HTTP server advertises its willingness to serve partial requests using the Accept-Ranges response header. A client then requests a specific part of a file from the server using the Range request header. If the range is valid, the server sends it to the client with a 206 Partial Content status code and a Content-Range header listing the range sent. If the range is invalid, the server responds with a 416 Requested Range Not Satisfiable status code.

Clients which request byte-serving might do so in cases in which a large file has been only partially delivered and a limited portion of the file is needed in a particular range. Byte Serving is therefore a method of bandwidth optimization.[4] In the HTTP/1.0 standard, clients were only able to request an entire document. By allowing byte-serving, clients may choose to request any portion of the resource. One advantage of this capability is when a large media file is being requested, and that media file is properly formatted, the client may be able to request just the portions of the file known to be of interest. This is essential for serving video files; if a server lacks this feature, videos hosted on that server may not be playable until the entire file has been downloaded by the client, and seeking within the file may be disabled. Similarly PDF files can be optimized for byte serving to allow multi-gigabyte files to be instantly viewable in the browser by only requesting the data required to render the current page.[5]

Leave a Comment