How's the process going when you put the address in the browser and press it in

Reading time11 min.
Article created
Updated

When the user enters the website ' s address into the address line of his browser ' s address and presses, a number of processes are under way to open the site on the screen. This process begins with the DNS request and ends with the user ' s browser. Let's figure out what's going on at each stage.

Step 1: DNS request

When the user sends the website address to the browser, the browser sends a request to the Domain Name System (DNS). DNS servers are responsible for converting the domain name into the IP address, which will be used to link the website. It's important to note that the address we see in the address line is called a home name. DNS serves as an e-telephone book that converts home names into IP addresses.

Step 2: Installation of the server

Upon receipt of the IP address of the server, the browser shall connect with the server through the HTTP protocol (or HTTPS if the website uses a secure connection). This process includes a tripartite compression between the browser and server: the browser sends synchronization (SYN), the server responds to the confirmation and sends its synchronization (SYN+ACK), and then the browser confirms the connection (ACK).

Step 3: Download of page

After a successful connection, the browser begins to download the page. He's sending a request to the server asking for HTML-code pages. Server, in turn, responds by sending the requested HTML code. Browser is starting to process and interpret the code obtained by creating a visual presentation on the user screen.

Of course, this process is a simplified description of how the browser displays the website. But he provides a general picture of how the website is being opened after the address is in place. Knowing what's going on under the hood, we can better understand how the web works.

Injection into browser

When you put the address in the address line of the browser and press the Enter key, the process is as follows:

  1. Analysis of the protocol: Browser analyses the address and determines what protocol should be used. For example, if the address begins with " http:// " or " https:// " , the browser will use HTTP or HTTPS protocol, respectively.

  2. Domain resolution: Further, the browser retrieves a home name from the address and sends a DNS server to get an IP address corresponding to the house. DNS servers answer by giving the browser an IP address.

  3. Installation of TCP: Browser sets out a TCP server connection using the IP address and port (usually 80 for HTTP or 443 for HTTPS). This TCP-connection may include three steps: connecting, data transfer and breaking the compound.

  4. HTTP request: Once the TCP connects, the browser sends HTTP-request to server. This request contains information on the requested address used by the method (e.g. GET or POST), the headings of the request and the request body (where the data are to be sent to the server).

  5. Response processing and generation: Server, after receiving the HTTP request, processing it, performing the necessary actions (e.g. requesting data from the database) and generating HTTP-response. The answer may contain the status code (e.g. 200 OK), the headings of the reply and the body of the reply (e.g. HTML code of the web page).

  6. Receipt and display of content: Browser accepts HTTP-response, which may include CSS styles, JavaScript code, images and other content. Browser processes the data, rents them and displays them on the screen as a web page.

The address to the browser therefore includes several steps, ranging from the analysis of the protocol to the display of content on the screen. The whole process allows the requested web page to be obtained and displayed.

DNS server

When you put the address in the browser and press Enter, there's a DNS server.

DNS servers are servers that monitor matches between domain names (e.g., example.com) and relevant IP addresses of computers where website information is stored.

  1. First, your browser sends a request for a local DNS server on your network.
  2. If the local DNS server does not have the requested information, he redirects the request to another DNS server. This process shall be repeated until the DNS server has been found with the necessary information.

When the relevant DNS server was found, there's an exchange of information between your browser and DNS server. Browser sends a home name request (e.g. example.com) and DNS server sends a response with an IP address.

For the transmission of information between the browser and the DNS server is used Protocol DNSwhich works at the top of the UDP Protocol (User Datagram Protocol).

Upon receipt of the IP address from the DNS server, your browser can send a request for this IP address to receive a web page or another resource related to the address.

The entire DNS server application process is carried out for several milliseconds and is usually not visible to the user.

IP address of website

When you put the website address on the browser and press Enter, the IP address of this site is being processed.

The IP address is a unique numerical identifier assigned to each device connected to the Internet.

To receive the IP address, the browser site sends a request to the DNS server (Domain Name System). DNS is a service that transforms home names, such as www.example.com, into an appropriate IP address.

  • Browser sends a request to the DNS server with the requested dominance.
  • Server DNS is looking for an IP address in his database.
  • If the IP address is found, the DNS server returns it in response.
  • Browser gets the IP address and connects the website server to this address.

The browser then sends HTTP (Hypertext Transfer Protocol) a request to the website server, indicating the desired page or resource. HTTP is a protocol that is used for the transmission of web pages between client(s) and server.

The web site server, upon receipt of the request, processes it and returns the answer to the browser, who then displays the page or contents of the resource on the screen.

Thus, the IP address of the site is the first step in connecting the browser with the server and downloading the contents of the web page.

Establishment of TCP Links

Following the introduction of the address to the browser and the downloading of the Enter button, the TCP connecting process, which is necessary for the transmission of data between the customer browser and server, begins. In this section, we will consider this process in greater detail.

  1. Browser checks the report on the address. It's usually HTTP or HTTPS for web pages.
  2. Browser analyses the address and extracts information on the house (e.g. www.google.com) and port number (usually 80 for HTTP and 443 for HTTPS) to which the connection needs to be installed.
  3. Browser sends the DNS request to the DNS server to receive the IP address of the server corresponding to the house.
  4. Upon receipt of the IP address, the browser shall establish an outgoing TCP-Socket (connection) with the IP address and port number.
  5. Browser initiates the TCP handshake process (compounding) in which special TCP-packages are exchanged between client and server.
  6. During TCP handshake browser and server, a secret key to encrypting data if HTTPS protocol is used.
  7. Once the connection is successfully established, the browser sends HTTP to the server with the specified route (e.g. /index.html) and other necessary headings (e.g. User-Agent, Referer).
  8. The Server receives the HTTP request, processes it and sends it back to HTTP-response with the requested contents and the status of execution of the request.
  9. Browser receives HTTP-response, analyses it and displays the information to the user (e.g. web page).

The establishment of the TCP Link is therefore an important step in the process of interaction between the customer browser and the server that allows data to be transmitted safely and safely between them.

HTTP request

When you enter the address to the browser and press Enter, there's a HTTP request.

HTTP (HyperText Transfer Protocol) is a data transfer protocol that is used to exchange information between the client (in this case, your browser) and server (the web application or website computer).

The HTTP request consists of several parts:

  • Method: Possible values are GET, POST, PUT, DELETE and others. The method indicates exactly what you want to do with the server (e.g., get data, send data or delete data).

  • URL: URL (Uniform Resource Locator or Unified Resource Index) is the address of the resource to which you want access.

  • Titles: The headings provide additional information on the request, such as data type, language, length of content and other.

  • Body: In some types of queries (e.g. POST), contents or data may be sent.

After your browser sends HTTP, the server accepts it and processes it.

Sever can perform certain actions depending on the method of request and the data transferred. For example, if you sent a GET request, the server could return the requested page or data. If you sent the POST request, the server could add a new entry to the database or perform another operation.

After processing, the server sends HTTP-response back to your browser, who then displays the contents of the screen response.

HTTP-response contains the following components:

  • Status code: The status code indicates whether the request has been successfully implemented or any problems have arisen. Some common status codes include 200 (OK), 404 (Not Found) and 500 (Internal Server Error).

  • Titles: The headings may contain additional information on the response, such as data type, coding and other.

  • Body: The answer body contains the actual contents that the browser can portray to the user.

The whole procedure, starting with the request to the answer, takes place in the background mode without your active participation. Browser and server interact with HTTP and other related technologies to download web pages and exchange data.

Server's processing the request.

Once the user enters the address to the browser and presses into it, HTTP is being sent to the server. To this end, the browser uses the HTTP protocol (Hypertext Transfer Protocol).

The HTTP request contains the following information:

  • Method: indicates the type of operation to be performed. For example, a GET for data or a POST to send data to server.
  • URI (Uniform Resource Identifier): The address of the resource to be addressed. For example, http://www.example.com/index.html.
  • HTTP-headings: provide additional information on the request, such as data type, language, coding and other parameters.
  • Name of request: contains the data to be sent to the server. For example, when the form is sent.

After the request is sent, it's on the server that handles it. During the processing of the server, the following actions are carried out:

  1. Checks the validity of HTTP-request: checks the correctness of syntaxis and the availability of the necessary headings.
  2. Determines what resource the request was made using information from URI.
  3. Looking for the requested resource on the server.
  4. Implements the necessary actions with the resource found. For example, if a GET request has been sent, the server may return the requested page or data.
  5. Creates a HTTP answer to be sent back to the client.

HTTP-response contains the following information:

  • Status code: indicates the status of compliance. For example, 200 OK for successful request or 404 Not Found if the requested resource is not found.
  • HTTP-headings: provide additional information on the response, such as data type, coding, date and time, and other parameters.
  • Answer: contains data to be displayed in the browser. For example, HTML-code pages or JSON data.

HTTP response

Upon receipt of a request from the browser, the web server should send HTTP-response back to the client side. The answer contains data to be displayed in the user ' s browser.

HTTP-response consists of three main components:

  1. Start line - indicates the HTTP protocol, the response code and its description. For example:
HTTP/1.1 200 OK
  1. Response headings - provide additional information on the request and its effect. Headings may contain information such as type of contents, date and time of reply, etc.
  2. Body of reply - contains the data to be displayed in the customer ' s browser. For example, the HTML code of the page or the contents of the requested file.

HTTP-response is sent by means of a TCP/IP protocol that guarantees the delivery of data to the client. Usually, the answer is sent using ready libraries that facilitate the process of answering and sending it to the client.

Once the answer is sent, the client's browser receives it and displays the contents in the browser window. If the response indicates the status code 200 OK, the request has been successfully completed and the answer contains the expected data. If the status code is different from 200, it indicates a mistake or other condition.

It is important to monitor the correct formatting of the HTTP-response so that the customer ' s browser can correctly interpret and display the information for the user.

Browser page display

The downloading and display of the web page begins after the address is entered into the browser and the Enter keys are pressed.

  1. Browser sends a request to the server in the address line.
  2. Server gets a request and searches a file corresponding to the requested address.
  3. If the file is found, the server sends it back to the browser with HTTP protocol.
  4. Browser is starting to analyze the data.
  5. If the file is a HTML pager, the browser is setting up a document structure using the HTML.
  6. Browser analyses the contents of the head containing information on the code of the page of the CSS files, violators and other metadata.
  7. The browser then moves to an analysis of the body that contains the main contents of the page.
  8. Browser handles different theories, such as headings (<h2>,<h3> etc.), subparagraphs (paragraphs)<p>List(s)</p><ul>,<ol>}<li>and creates relevant elements on the page.
  9. If references are found on the page, the browser creates objects for each reference, allowing users to cross different pages when they are clicked.
  10. Browser also handles images using the Gate and pictures them on the page.
  11. Browser applies the styles and formats specified in the CSS files to outsource the page.
  12. Once the browser has completed the analysis and display of the contents of the page, the page becomes available for view and interaction by the user.

Thus, the page display process in the browser includes the request and receipt of a file from the server, the analysis of the browser page code and the establishment of an appropriate structure and elements on the page.

Question-record

How's the DNS Server connection and the IP address?

Browser makes a request for a DNS server who answers by providing the IP address to the site. The Home Name System (DNS) is used for this process. Browser sends a DNS server request, pointing URL to the site. The DNS server is searching for the site in its database and, if found, returning the relevant IP address. If the DNS server doesn't know the IP address of the site, he can send a request to another DNS server until he finds the necessary information.

How does TCP connect to the web server?

Upon receipt of the IP address of the site, the browser shall establish a TCP link with a web server using the IP address and port. TCP (Transmission Control Protocol) is a protocol used to ensure the reliable delivery of network data. Browser and web server shall be exchanged with special messages to agree on the parameters of the compound and to establish a working connection. This includes the installation of initial sequence numbers, window size and other parameters necessary for data exchange.