Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what happens when you type https://www.google.com in your browser and press Enter #2039

Open
MostafaRaafat91 opened this issue Apr 14, 2024 · 1 comment

Comments

@MostafaRaafat91
Copy link

https://medium.com/@mostafaraafat91/what-happens-when-you-type-https-www-google-com-in-your-browser-and-press-enter-322f53c81481

@osinnworld
Copy link

When a web page is rendered, its Document Object Model (DOM) is built, any JavaScript code is run, and the HTML and CSS code is parsed. Next, the rendered page opens in the browser window. Entering [www.google.com] (http://www.google.com/) into the address bar of any browser from a specific location initiates a series of events that we will discuss here.

Requests for the domain name "google.com" to be resolved to an IP address are sent by your computer to the Domain Name System (DNS) server. In response, the DNS server provides the website's hosting server's IP address. Requests for the website's content are sent by your browser to the server at the IP address provided. TCP (Transmission Control Protocol) is used to send this request over the Internet; it is referred to as an HTTP (Hypertext Transfer Protocol) request. The HTML, CSS, and JavaScript files that comprise the website are sent to your browser by the server in resonse to the request. These files are typically transmitted over the Internet via HTTP as a data stream. As soon as your browser has the files, it starts to render the page. In order to create a Document Object Model (DOM) of the page, the HTML and CSS code must be parsed. Any JavaScript code must then be run. Upon completion of rendering, the page appears within the browser window. Following that, you can engage with the page by clicking links, completing forms, and so forth.

What occurs in reality...
The Google homepage appears in your browser window when you type https://www.google.com/ or any other URL and hit Enter. This is the result of a series of events that are set in motion.

A Domain Name System (DNS) server receives a request from your browser first. By translating the website's domain name (google.com) into an IP address that your computer can comprehend (such as 216.58.217.206), this server functions similarly to a phone book. This is the server that houses the Google website.

As soon as the IP address is known, your browser contacts the server running on that address to request the content of the website. In the event that the server is able to comply with this request, your browser starts downloading the HTML, CSS, and JavaScript files for the website.

Your browser loads these files and starts to display the website on your screen, bringing in extra resources (pictures, for example) as needed. You can start interacting with the website as soon as all of the resources have been downloaded and it has fully loaded.

It is noteworthy that the entire process occurs in a matter of milliseconds, on average. Websites feel so quick and responsive to us because of this.

Not to mention, the website you are viewing is secured by an SSL/TLS certificate, as denoted by the "https" at the start of the Address. This guarantees the security of your data and personal information while you browse the web because it encrypts all communication between your browser and the server.

You can interact with and peruse the different links and resources on the page when the browser shows the fully rendered Google homepage in the window.

It should be noted that more steps than those listed above are involved in the request and display of a webpage. Numerous other technical details are involved in making this process possible, such as the use of encryption to secure communication between your browser and the server and the use of DNS servers to convert domain names into IP addresses. But the fundamental idea remains the same: your browser requests a webpage, and the server responds with the webpage's content, which your browser shows to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants