Netflix Don't Slow Me Down

2007-02-09 12:07PM PST/Home

Philip Aaronson

Netflix, I love you. Seriously, I love your service, but this crap ticks me off. I was checking my movie queue this morning, and there was this unusual delay after the page rendered. I took a quick look at the page source, and I find a wad of 28908 bytes worth of what looked like uuencoded crap. Really, 28K with a couple hundred return lines. Here's a clip from their page source.

<script type="text/javascript">
    var startTime = new Date().getTime();
</script>
<!--
[clipping 28KB + a couple hundred return lines]
-->
<script type="text/javascript">
    var elapsedSeconds = (new Date().getTime() - startTime)/1000;
    var width = document.body ? document.body.clientWidth : 0;
    var height = document.body ? document.body.clientHeight : 0;
    var kbPerSecond = 700;
    if(elapsedSeconds > 0){
        kbPerSecond = Math.round(8 * (32 / elapsedSeconds));
    }
    var dummyImage = new Image();
    dummyImage.src = PAGE_ROOT +
        "SetSpeedCookie.jsp?lospeed=Y&rawspeed=" +
        kbPerSecond + "&height=" + height +
        "&width=" + width;
</script><script language="javascript">
if(document.getElementById &&
   typeof STARBAR_SET_PAGE != "undefined")
     StarbarFillInAll();
</script>

Okay, fine, it looks like Netflix is attempting to measure my connection speed. First of all, why? Second of all why in my client do this on the server. Third of all, where is the 32 coming from, I was expecting 28 give or take a few bytes? I colored that part of the code in red. And finally, I'm downloading a heck of a lot of images at the same time this crap is going on, so aside from computing kbits per second wrong in the first place, it's not terribly accurate. I looked in Safari's activity window, the number they computed is 1094kbits/sec for my connection. I just ran this a few times, and okay, it's the image server:

curl 'http://cdn.nflximg.com/us/pages/bob/topcap1.png'

But I'm seeing an average of about ~1800 kbits/sec (I'm at work). I guess they're sort of close.

But to sum up, Netflix, you're degrading my user experience so you can ballpark compute my connection speed that you have no real need for. Stop it. And if you do have a need for this, compute it at your server.