Browser - User Requests

CHAPTER 3

browser request

Every time you want something from your favourite online store like Amazon, you start by placing an order — just like how your browser sends a request when you're trying to visit a website.

So, the online store checks its system to find the right warehouse to ship your order, your browser does a lookup to find the correct Server IP address for the website you requested.

That's where the DNS ( Domain Name System ) comes in.

The DNS server takes the website name from the browser, finds the matching IP address in its records, and returns it so the browser can connect to the right server.

BonusAn IP address (short for Internet Protocol address) is a unique string of numbers that identifies a device on a network. There are Public, Private, Static and Dynamic IP addresses.

Wait, before transferring the request or response data, we need to actually have a proper set of rules or protocol. In terms of web, the most common protocols are HTTP (Hypertext transfer protocol) and HTTPS ( Hypertext transfer protocol Secure). 

If you're curious about what a real browser request looks like, you can see it for yourself.

  1. Open a browser on your laptop.

  2. Search for www.beginnerscribble.com

  3. Right-click anywhere on the page and select Inspect (or press F12).

  4. Go to the Network tab.

  5. Refresh the page—you'll see a list of network activities.

Each item in that list represents a request your browser made and the response it received from the server.

If you click on one of them, you'll see detailed information.

  • Under the Payload Tab -  shows the request / query payloads
  •  Under the Request Headers section, you'll find key details such as:

GET / HTTP/1.1
Host: www.beginnerscribble.com 
User-Agent: [browser info]
Accept: text/html

These headers show what the browser sent to the server—like the method (GET), the host (domain), and what kind of content it's expecting.

The commonly used methods in HTTP are GET, POST, PUT and DELETE. 

Let move on to Chapter 4 >>> to dig more about the servers and responses.


Comments

Popular