5

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?

  • Let me ask this with a grin - How many kb is the accept-ranges header? – closetnoc Jun 7 '16 at 3:07
  • the item in which I'm disputing adding accept-ranges to? twenty kilobytes max. – Mike Jun 7 '16 at 3:13
  • I am not sure you got the joke. It would probably expand past the 20kb by adding the header making it worse. ;-) Still with HTML so small, I think I would ignore this advice. It sounds silly to me. – closetnoc Jun 7 '16 at 3:16
  • LOL oh... you mean the words "accept-header". lol. I mean if I can get some sort of gain in income or guest satisfaction for adding it, then I'd add it. – Mike Jun 7 '16 at 3:20
  • I am sure there is some geeky glasses wearing pocket protector mofo owt dare that would applaud you. Otherwise, I am not sure anyone else would notice. – closetnoc Jun 7 '16 at 3:24
1

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
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.