World Wide Web commonly known as Web is a collection of electronic hyper text documents stored in a computer linked together like a spider’s web which can be accessed via internet. The web browser is a software program that acts like a computer program e.g firefox, chrome, safari (Web clients). In a day 3.3 billion searches happen on google search index. HTTP header plays an important role in browsing information from web servers.
Keep in mind that HTTP header fields are components of the header section of request and response messages in the Hypertext Transfer Protocol (HTTP).
Let’s understand what happen when you type http://www.google.com/index.html in url of the web browser. The browser parses the URL link into 3 parts:
- Protocol: http://
- Server Name: www.google.com
- / index.html: path of the page
When this passed URL comes out of the browser it becomes HTTP Request.
The request is forwarded to the server and server send HTTP Response against particular request in the same way.
HTTP defines the protocol of how your internet browser communicates with a web server. Because your internet browser and web server agreed to implement the same protocol, they are able to communicate.
When you enter http://www.google.com in your browser’s address bar and press return,
the following steps describe what happens on a high level:
• Your browser extracts the domain name from the URL, www.google.com.
• Your computer sends a DNS request to your computer’s configured DNS servers.
DNS can help resolve a domain name to an IP address, in this case it resolves to
Tip: You can use cmd on your system to find the IP address of any website e.g www.google.com.
• Your computer tries to set up a TCP connection with the IP address on port 80,
which is used for HTTP traffic.
Tip: you can set up a TCP connection by running nc 188.8.131.52 80 from your terminal.
• If it succeeds, your browser will send an HTTP request like:
GET / HTTP/1.1
Accept: application/html, */*
• Now it will wait for a response from the server, which will look something like:
HTTP/1.1 200 OK
case, the home page of Google.com will be shown on your screen.
Learn more about hacking.