Mobile app version of vmapp.org
Login or Join
LarsenBagley505

: Is it an overkill to specify the accept-ranges header for small HTML pages? I tested my site homepage through rigor.com (formerly zoompf.com) and they believe all resources should have an accept-ranges

@LarsenBagley505

Posted in: #Download #Http #HttpHeaders

I tested my site homepage through rigor.com (formerly zoompf.com) and they believe all resources should have an accept-ranges header, but since my HTML code size is under 20 KB (mostly under 10 KB), I somehow feel it is an overkill for the need for that header to be present for the initial HTML page.

I added the header to the images because they are larger than 50 KB and I figure its proper to allow a browser to download parts of the image to complete the download, but for a 20 KB HTML file, I think the need is ridiculous.

Would adding that header make any sort of positive difference even though internet connections now are very fast? or would the header just be an overkill?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @LarsenBagley505

2 Comments

Sorted by latest first Latest Oldest Best

 

@Yeniel560

HTML code size is under 20 KB


Since you mention HTML file, there is no need for range headers for HTML files.

For following reasons


often HTML files are generated by dynamic languages (PHP, JAVA,...) and can change for every single request, so making 2 requests to 'split' the range will result in errors
HTML files are that small that it makes no sense for range requests.
Range Requests are recommended for download of big files like MP3s, high res JPGs, ISO,... as they speed up download by splitting big files in chunks which are downloaded at same time.
For html and assets (images, js, css) it would be an disadvantage for the server to be asked for range requests downloads.
New technologies like HTTP2 actually do the opposite, they try to combine multiple html assets into ONE request (right after HTML response)
For all above, you are just increasing header size and wasting your traffic if you add those headers unnecessarily

10% popularity Vote Up Vote Down


 

@Angela700

The standard imposes no limits to the size of each header field name
or value, or to the number of fields. However, most servers, clients,
and proxy software impose some limits for practical and security
reasons. For example, the Apache 2.3 server by default limits the size
of each field to 8190 bytes, and there can be at most 100 header
fields in a single request.


The value of accept-range header tells what type of ranges, if any, the server accepts for a given resource. You can define range requests and the rules for constructing and combining responses to those requests.

So to conclude... /and correct me if I'm wrong

Adding that header will not make any sort of positive difference in this situation because document itself is too small, and we're no longer in era of 56K modems.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme