What happens when you type go-jek.com in the browser? (Part 2)
Continuing from the previous blog.
The third step is:
HTTP Request to Web Server
Once the TCP connection is established, the browser will send a GET request asking for go-jek.com web page.
This request will also contain additional information such as browser identification, types of requests that it will accept. It will also pass information taken from cookies the browser has in store for this domain.
Note: You can use tools such as Firebug to take a look at HTTP requests.
Response Send back by Web Server
Web servers such as Apache, etc. receives the request from the browser and passes it to a request handler to read and generate a response. The request handler is a program that reads the request, its’ headers, and cookies to check what is being requested and also update the information on the server if needed. Then it will assemble a response in a particular format.
You can go through this link to understand how web servers are created.
HTTP Response by Web Server

As you can see, it contains the web page you requested as well as the status code, how to cache the page (Cache-Control), etc.
On top, there is a status code:
It tells us about the status of our request. There are a total of three different types of status code :
- 1xx indicates an informational message only
- 2xx indicates the success of some kind
- 3xx redirects the client to another URL
- 4xx indicates an error on the client’s part
- 5xx indicates an error on the server’s part
Here, it gets 200 so success of getting the response in terms of an html page.
Now you know error 404.
Browser Renders and Displays HTML Content
It renders the bare bone HTML skeleton. Then it checks the HTML tags and sends out GET requests for additional elements on the web page, such as images, CSS stylesheets, JavaScript files etc. These static files are cached by the browser so it doesn’t have to fetch them again the next time you visit the page. In the end, you’ll see go-jek.com appearing on your browser!!