What happens when you type google.com in your browser and press Enter

What happens when you type google.com in your browser and press Enter

Do you know what happens when you search for google.com in the browser?

Internet is currently available to everyone, but only very few people really know what happens when you request one of the sites that are available, in this article I want to explain how this whole process happens.

Process

What happens when you type www.google.com or any other url in your web browser and hit Enter the first thing that happens is that your browser looks in its cache to see if that website was visited before and the ip address is known. If it cannot find the ip address for the requested url, it asks your operating system to locate the website, if the url is not found within, the operating system will make a DNS request to find the ip address of the web page. The first step is to ask the server to look in its cache to see if it knows the ip address, if it doesn't, it asks the root server to ask for the TLD .COM (Above Level Domain) - if your URL ends in .net, then the TLD server would be .net and so on - the TLD server will check its cache again to see if the requested ip address is there. Otherwise, it will have at least one of the authoritative nameservers associated with that URL, and after going to the nameserver, it will return the ip address associated with its URL. All of this was done in a matter of milliseconds.

Now that we have the IP of the server, finally the browser will be able to send a request with the GET method using the HTTP protocol (Hyper Text Transfer Protocol) so that the web server responds with the corresponding HTML, CSS and JavaScript files. The response is accompanied by the status code, there are 5 types of status detailed by means of a numerical code: 1xx indicates a message for information only. 2xx indicates some kind of success. 3xx redirects the client to another URL. 4xx indicates an error on the client side. 5xx indicates an error on the server side.

It is very possible that the communication is also carried out by the https protocol, which is an Internet communication protocol that protects the integrity and confidentiality of user data between their computers and the website. Since users expect their online experience to be secure and private.

要查看或添加评论,请登录

Valentin Repetto的更多文章

  • Bun 1.0

    Bun 1.0

    La reciente llegada de Bun 1.0 ha causado revuelo en la comunidad de desarrolladores JavaScript.

  • Nest js

    Nest js

    Introduction I have been hearing about nest js for a long time now, about its potential and features but I had never…

  • TypeScript

    TypeScript

    What is Typescript? Typescript is a programming language that is transpiled into Javascript. It is a superset of…

  • Recursion

    Recursion

    The process in which a function calls itself directly or indirectly is called recursion and the corresponding function…

  • Everything is an object in python

    Everything is an object in python

    Introduction Objects can be defined simply as the instance of a class that contains both data members and method…

  • Dynamic libraries

    Dynamic libraries

    To start talking about dynamic libraries, we will remember what libraries are and what they are used for. Certain types…

  • What happens when you type `ls -l *.c` in the shell?

    What happens when you type `ls -l *.c` in the shell?

    INTRODUCTION In this occasion, and as part of the “simple_shell” project, we have to write about the “ls -l *.c”…

  • Static libraries in c

    Static libraries in c

    This time I will inform you about the static libraries in c and how they work Whats are libreries? Libraries are a…

  • COMPILATION PROCESS

    COMPILATION PROCESS

    I will give a brief summary of how the compilation process works, from a high level language (that we can understand)…

社区洞察

其他会员也浏览了