DEV Community

Cover image for What happens when you type a URL into your browser?
Dhanush N
Dhanush N

Posted on

What happens when you type a URL into your browser?

Every day, when you open your computer, you navigate to your favourite social networking, news, or e-commerce websites. You can get to this page by typing in the URL or by clicking on one of the page's links. Ever thought about what occurs in the background? How do you get the news when you type in the URL and press Enter? How did the images in this post look on your web browser? When your tweets and feeds appear in your browser, how are they secured?

We'll examine what occurs when you type a URL into your browser and hit Enter in this post. The browser, your computer's operating system, your internet service provider, the server where your website is hosted, and the services that operate on that server are all involved in the process from beginning to end. It's critical to comprehend potential trouble spots, know where to look for performance problems, and make sure your users are receiving a secure experience.

These are the steps that browser takes :

  1. Finds out where the website is hosted on the server.
  2. Establishes a connection with the host
  3. Submits a request to obtain the particular page.
  4. Processes the server's response
  5. Shows the page and allows you, the visitor, to interact with the website

IP addresses, servers, and websites

Websites are groups of files that instruct your browser on how to display the site, graphics, and data. These files are frequently HTML, CSS, Javascript, and pictures. It is neither scalable or dependable to host them on your personal computer because they must be available to everyone at any time, from anywhere. These files are kept on a potent external computer known as a server that is online.

The parts of the url is shown in the below image

Image for parts of a URL

A detailed explanation on what happens when a url is typed in the browser and when enter key is pressed is explained in the below video:

These are the 6 essential steps which happen when the url is typed in the browser

  1. You enter a URL in your browser and press Enter.
  2. The browser searches for the IP address associated with the domain.
  3. The browser establishes a TCP connection with the server.
  4. The browser sends an HTTP request to the server.
  5. The server processes the request and generates a response.
  6. The browser renders the content received from the server.

Thanks for reading, please give a like as a sort of encouragement and also share this post in socials which might benefit someone.

Connect ⬇️

Twitter / Instagram / Github / Youtube / Newsletter / Discord

Top comments (0)