Python Web Apps that Fly with CDNs Transcripts
Chapter: Welcome to the course
Lecture: More than one request

Login or purchase this course to watch this video and the rest of the course contents.
0:00 I told you that web pages require more than one network request to load them up. Well, let's make that concrete.
0:08 Here's an example that's close to home, the courses catalog page over at Talk Python Training. Here we have our different courses that you might take.
0:17 So this involves some CSS, some plain HTML, of course, lots of images. Every course has an image file. Now look down here in the bottom.
0:27 I've opened up the network tools, the dev tools, and gone to the network section in my browser, Vivaldi. We are going to spend a lot of time
0:35 down in the network tools for your browser because that's how you see exactly what's happening with all this interchange.
0:42 So you can see down here that there is actually 109 requests to serve this page. And this isn't even a fancy front-end framework type of situation.
0:52 We're not using Vue or Angular. We're just doing straight server side responses with HTML.
0:58 And then there's just a bunch of resources you've got to get. And yet the content is loading incredibly fast, 196 milliseconds. And in this scenario,
1:08 I told you the servers on the East Coast of the US and the users on the West Coast. Well, I live on the West Coast. That's where I made this request.
1:16 And the server is actually hosted on the East Coast in New York City. So it's also close to Europe, not just Americans.
1:23 And so the ping time there is about 100 milliseconds. So this page loads incredibly fast, but it still has to make a ton of requests.
1:31 When you think about that picture and those users who are far away like Australia or Africa or places like that,
1:39 they've got to make a lot of requests back to get those static resources, at least the first interaction they have with them.
1:46 And it's not just that one ping time, that one load time of that basic HTML page, it's amplified across, in this case, 109 requests.


Talk Python's Mastodon Michael Kennedy's Mastodon