Reputation: 14653
Our website is serving pdf documents to our clients. The pdfs are 25MB a piece and they are linearized (fast web view). Our site is using jsp pages to deliver the content. In the initial get we include the following headers. The key header is the accept-ranges:bytes. This notifies the client that it can send byte ranges for the content.
Content-Disposition:inline;filename=List.pdf
Content-Length:27575708
Content-Type:application/pdf
Date:Thu, 16 Feb 2012 03:04:05 GMT
ETag:1.0_2012-02-15
Server:Apache/2.2.3 (CentOS)
accept-ranges:bytes
When chrome downloads the pdf's it slowly increases the size of the range of data in its requests. For the 25MB file about 60 requests will be made to the server. Here are the response headers that we send to the client.
Content-Disposition:inline;filename=List.pdf
Content-Length:524288
Content-Type:application/octet-stream
Date:Thu, 16 Feb 2012 03:05:56 GMT
ETag:1.0_2012-02-15
Server:Apache/2.2.3 (CentOS)
accept-ranges:bytes
content-range:bytes 8408895-8933182/27575708
IE 9 however will only send requests that are 16KB in size. This leads to 300+ requests for small amounts of data, which makes the downloads take extremely long for the large files. Is there something that I am missing in my http responses?
Upvotes: 3
Views: 1959