13

I'm building a page (using video.js, should it matter) that holds players for a reasonably large number of videos -- click a button on a thumbnail of the image and a modal player opens up, playing the video. Works fine; no big deal. My server is Apache 2.2.15, fwiw.

The question: when I look at my server logs, I see entries for each of the videos with an HTTP code of 206 (partial content), such as:

GET /videos/a_video.mp4 HTTP/1.1" 206 1130496 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.73.11 (KHTML, like Gecko) Version/7.0.1 Safari/537.73.11"

I'm not sure what these entries mean, exactly. When this page loaded, was 1.1 MB of stuff really pushed over the network to the client, or is this just information that the client is meant to use when/if the file is really requested by the user? Dumping all this stuff onto the user/client would be a pretty piggish thing to do to somebody's bandwidth (let along my site's), especially on a mobile connection. (Based on some additional log analysis, it looks like those bits are really getting pushed, but checking this with other more knowledgeable people surely seems like the right thing to do...)

Jim Miller
  • 713
  • 2
  • 11
  • 23

1 Answers1

16

This looks perfectly normal to me. Most video (and even audio!) players request small chunks of the file at a time, and then request more later, as the user actually plays the video. 206 is only sent when the user-agent specifically requests a specific range of the file, rather than the entire file.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • I think it's normal too; my point/question is whether the first part of the video was in fact pushed to the client as part of loading the page. Are you saying that it is? – Jim Miller Feb 01 '14 at 22:09
  • 1
    Apache doesn't log _which_ part of the file the user requested, but the fact remains that the user made a partial request. So, something on your page is causing the client to load part of the video. – Michael Hampton Feb 01 '14 at 22:12
  • Got it -- It's most likely the video player initializing itself. Thanks! – Jim Miller Feb 01 '14 at 22:19