We host some video files (mp4) on our site.
All the files are loaded way too slow in Google Chrome, in FF everything is OK.
I tested downloading of a file with size of 34MB (I opened the file by a direct link). The results are:
- Chrome made ~22000(!) requests, 982MB transferred.
- Firefox made only 5 requests.
As a server we use nginx with default (related to video files serving) settings.
Here the interaction (the first five requests) beetwen Chrome and the server. Only Range
, Content-Length
, Content-Range
headers included.
(< - header sent by Chrome, < - one sent by the server):
> Initial request for file, usual GET
< Content-Length:35690389
< Content-Type:video/mp4
Then a bunch of similar requests, on which the server responded with 206 status code:
---
> Range:bytes=0-
< Content-Length:35690389
< Content-Range:bytes 0-35690388/35690389
---
> Range:bytes=29100305-
< Content-Length:6590084
< Content-Range:bytes 29100305-35690388/35690389
---
> Range:bytes=35566374-
< Content-Length:124015
< Content-Range:bytes 35566374-35690388/35690389
---
> Range:bytes=32-
< Content-Length:35690357
< Content-Range:bytes 32-35690388/35690389
Looks like Chrome misunderstand some headers which are sent from the server (e.g. Range) and downloads the same pieces of file many times.
What might cause the problem? Any ideas?