Have you ever downloaded a podcast episode, or a video file, from a mobile device with a potentially unstable data connection? How do devices like this handle terrible connections that drop and reconnect to a different cell tower? Or just stop downloading for random reasons like a phone call coming in?
The HTTP header for byte range requests allows a client to say “give me this data, specifically” for a given file or other resource it is downloading. When this header is included, the web server will only return the requested data bits for the given resource.
This is great news for mobile devices on cell tower data connection. But it's terrible news when it comes to recording analytics for your downloads.
If a device makes 10,000 requests for your file, giving a small byte range request every time, you'll end up with 10,000 analytics entries for a single download!
So – how do you correct for this? Find out in this episode of WatchMeCode, where we look what it takes to properly handle byte range request headers with our analytics and tracking code.