[net] What happens when you type a URL in your web browser ?
- You enter a website's URL in your web browser and press enter.
- Your web browser sends a request to the domain name system (DNS) to translate the domain name in the URL to an IP address.
- The DNS responds with the IP address of the web server hosting the website.
- Your web browser establishes a connection with the web server using the Transmission Control Protocol (TCP).
- Your web browser sends a request to the web server for the website's HTML file.
- The web server receives the request and sends the HTML file back to your web browser.
- Your web browser parses the HTML file and sends additional requests for any other assets needed to display the website, such as images, CSS files, and JavaScript files.
- The web server sends each requested asset back to your web browser.
- Your web browser renders the website, combining all the assets it has received into the final website displayed on your screen.
Image from Alex Xu