http-headers Accept-Ranges: (Response)

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

Accept-Ranges tells the client that this server will supports ranges for this resource (file).

Syntax

  • Accept-Ranges: RangeType
  • Accept-Ranges: none

Parameters

ParameterDescription
RangeTypeThat type of ranges are supported. This is currently only bytes or none.
noneThe server does not support ranges on this resource

Remarks

Accept-Ranges is part of the ranges system. The ranges system lets the client request only part of a file instead of having to download the whole file.

For example if a client only needs the last 100 bytes of a 10M file it can request the server only send data from offset 10485660 to 10485760.

Accept-Ranges is sent from the server to tell the client if it supports ranges. This only applies to this particular resource (file), other files may accept different range types.

Only two values are currently defined, bytes and none. The values bytes means that you can request byte ranges (offset and end will be in bytes). A value of 'none' means the server does not support ranges.

Clients are free to request byte range requests without checking if the server supports ranges.

The client uses Range to request a range from the server and the server replies with a status of 206 (Partial Content) if it is sending the range of bytes or 200 (ok) if it is going to send the whole file.



Got any http-headers Question?