How browser communicates with server

Nowadays we can get all the services online like banking, Train ticket booking, cinema ticket booking, shopping, learning, etc. But I am a little curious about how the browser works. I started searching and found something useful.
html sample image
We may use different types of browsers on our mobile, laptops, and desktops, but all the browsers working with the same technique.
While we hit the URL in the browser, the URL will transfer to DNS Services.

DNS Services

DNS Stands for domain name services, every server has its IP address as like our computer, We can able to access the server by its IP addresses but which are not easy to keep in mind. So we are mimicking the IP Address with the name which is the Domain name.
While hitting the URL, the browser cache check is the first step. If the browser cache is not available, the OS cache check is the next step. If the OS cache does not resolve, It will check the Router cache. Moreover, Router cache also not resolved, then it will check the ISP Cache.
  • Browser cache
  • OS Cache
  • Router Cache
  • ISP cache

DNS Hierarchy

  • Root level domain(.)
  • First level domain(Ex. ".com")
  • Second level domain(Ex. "infoskarp")
  • Third level domain(Ex."www")
  • If the IP Address is determined from the DNS Hierarchy, Connection will be initiated between the browser and the server. The connection is started over the internet(ISP). TCP/IP Protocol is standard for data interchange between the browser and the server.
    Once the connection is initiated, the below steps will happen before starting the data exchange.
    • The browser sends a synchronize message to the server.
    • The server sends back synchronize messages with the acknowledgment concerning the browser.
    • The browser sends back an acknowledge message to the server.
    The server returns the data which are requested from the browser, Based on the server response browser will display the content.