![]() ![]() It gets down here, and it requests bundle.js, and you can see these showing up here in that same order. The next item in our network history is an http request for style.css. It's then going to step through as it renders this, and it's going to create additional requests for everything that it finds in here. In this case, the response is a validly formatted HTML, which the browser then spits out right here and renders. That whatever server is running on that host figures out how to parse this request, and it sends us something in response. What happens is this request, this text string gets serialized into bytes and sent to this host. We tend to think of it as a verb, like I typed in some URL, I hit Enter, and magically a bunch of stuff appeared. There's a lot that the server's going to read for you, like a lot of times you don't need to worry too much about what's in here, but it can be really helpful to understand that a request is actually like an object. There's a lot that your browser's going to stick in there for you. This is where information metadata about the request gets written. We submitted a Get request, and the response was a code 200. If we look, we see that there's a bunch of information here. This is what we requested when we put a URL into the browser. Let's take a look at what we've got here. As long as you've got this panel open, you'll be able to see all the history of everything that was requested by your application and what the server sent in response to those requests. As your application runs, and additional requests are sent to the server, those requests are going to show up here as well. If we go over here to the network panel - let's go ahead and do a clean empty cache and hard reload - what you see here on this panel is the set of all requests that were generated in order to render what you see on the screen in front of you. All of these things become additional http requests, and Chrome gives us some pretty awesome Dev tools for being able to introspect and understand those requests. Then it steps through that HTML, and it looks to see whether it needs to pull down, for instance, a style sheet or any images. The server then returns some HTML, and the browser renders it. Behind the scenes, what my browser has done is create an http request and sent it to this host on this port, requesting the resource at this path. I type in I put in a host, I put in an optional port, and I put in a path. If I want to view a website, I can type in a URL. Everything your browser does, it does by generating what we call http requests, and it sends those requests to a Web server somewhere, which then returns some sort of a resource. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |