But you are also subject in the applications that you build to a whole series of external factors including, for instance, networks. The bottom line is the one that I would look at here, which is to say that this is the 25th percentile in this distribution, think of it as being P75, flip it around in your estimation, the 25 per cent of network connections are worse than this, and Cloudflare's pretty good analytics system here reckons that that's getting you between seven and nine megabits per second down. Seven to nine megabits per second down is worse than most satellite internet connections. This doesn't count RTT, I think RTT is in P75, sitting about 100 milliseconds. I don't know if you've done this lately, but you can get most of the way around the world with ping with a couple of packets in 100 milliseconds. So into that network condition, what are we doing? What has our community chosen to do? Well, we're sending a lot of stuff down the wire.
Ten years ago, that was 1.2 megabytes total, compressed, potentially, if you're compressing, but total transfer for most websites at the 50th percentile to mobile, and today, it's 2.7 megabytes. So we've more than doubled the size of the average website payload at the 50th percentile, and JavaScript is doing numbers too. So today, sorry, in 2016, that would have been 310 kilobytes of that 1.2 megabyte payload would have been JavaScript, which uncompressed is a whole honking load of JavaScript. I just want to be very clear. You can do a ton of stuff in 300K of JavaScript, and we were sending that at the 50th percentile. Right? At P75. And today, we're sending three-quarters of a megabyte of JavaScript to mobile users, and half of users get at least that or more.
What does it look like at the tail? Well, it used to be 850K, but we have really lost all control. It's now more than 2.1 megabytes. Unzipped, we would expect 2.1 megabytes. If it's gzip, it would be 5 to 7 megabytes. It's more than that. What are you doing with 7 megabytes of JavaScript? Do we know? Do we understand what we're doing with 7 megabytes of JavaScript? Do we have an understanding of what's actually in there? I think we don't. And I think to understand what this means for us, we have to understand how we got here. I think everyone in this room is here because we are all dedicated to the exact same thing. We want better user experiences. Right? Yes? Yes? Okay. Good. I'm not speaking to the wrong audience. Great. That's good. And to get that, we decided that we were going to make a trade. We were going to buy into a lot of complexity, because browsers weren't very good, and the trend line was in 2008, 9, 10, 11, that CPUs were getting much faster and networks were getting much more predictable and faster, and that we were going to have more headroom on the JavaScript side, even though the browser engines weren't necessarily keeping up. So we put JavaScript in the critical path, because it was the thing that could give us what we couldn't get any other way, which was to say, better browsers.
Comments