What happens when we type a URL into a browser?

What is an URL?
URL stands for Uniform Resource Locator. A URL is nothing more than the address of a given unique resource on the Web. In theory, each valid URL points to a unique resource. Such resources can be an HTML page, a CSS document, an image, etc. In practice, there are some exceptions, the most common being a URL pointing to a resource that no longer exists or that has moved. As the resource represented by the URL and the URL itself is handled by the Web server, it is up to the owner of the web server to carefully manage that resource and its associated URL.

  1. Browser checks cache for DNS entry to find the corresponding IP address of the website. It looks for the following cache. If not found in one, then continues checking to the next until found.
  • Browser Cache
  • Operating Systems Cache
  • Router Cache
  • ISP Cache
  1. If not found in cache, ISP’s (Internet Service Provider) DNS server initiates a DNS query to find IP address of server that hosts the domain name.
    The requests are sent using small data packets that contain information content of request and IP address it is destined for.
  2. The browser initiates a TCP (Transfer Control Protocol) connection with the server using synchronize(SYN) and acknowledge(ACK) messages.
  3. The browser sends an HTTP request to the web server. GET or POST request.
  4. Server on the host computer handles that request and sends back a response. It assembles a response in some format like JSON, XML, and HTML.
  5. Server sends out an HTTP response along with the status of response.
  6. Browser displays HTML content
  7. Finally, Done.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Luis Castillo

Luis Castillo

Software Engineer / Full-Stack Developer in Ruby, Ruby on Rails, JavaScript, ReactJS, Redux, SQL, HTML5, CSS3