Why should a web developer care about HTTP?

When you visit a web page, your browser sends an HTTP request to a server which sends a response..It’s (almost) that simple.Actually, a single web page is usually comprised of multiple requests..What usually happens is a request is made for some HTML, and the server responds with the HTML..The browser starts rendering the HTML and makes additional requests for any other resources it needs to render the page — like Javascript files, CSS files, and images.Parts of a RequestHere’s what a raw request to RadDevon.com for the home page looks like:GET / HTTP/2Host: raddevon.comUser-Agent: curl/7.54.0Accept: */*When you type raddevon.com into your address bar and press return, your browser sends this request to my host..Here are the parts:GET– The request method..It tells the server what the request is intended to do..This request wants the server to send back some data..MDN has a nice request method reference./– The resource we’re requesting..Since the homepage is at the root of the server, that’s the resource we’re requesting here.HTTP/2– The protocol..This particular request is made using version 2 of HTTP.The other three lines are headers..These give the receiving server additional information about this request.Host is pretty obvious..It identifies the target host.User-Agent identifies the client sending the request.. More details

Leave a Reply