When You Go Back to Previous Webpage Does the Get Request Run Again

What happens when you click on a URL in your browser

In this article, I want my readers to get a picture of a very basic concept of the spider web globe. Previously, I've written articles on the fancy stuff of today's market, i.eastward. Angular journey, basics of react, etc. But, today, I desire my readers to go into the journeying which they encounter at first when they hitting any URL.

As the topic is self explanatory - when we hitting any URL then what happens? - let's start!

Earlier discussing what happens afterward hitting the URL, nosotros must become through what a URL actually is, and what different parts of the URL mean - right? Without wasting any fourth dimension, permit'southward understand more about URLs.

URL – Uniform Resource Locator

If you look into its full form, then it is cocky explanatory: it has the location of the resources which we want to admission. It is an address of the identify where nosotros want to go to collaborate with or find data.

Let's look into your daily life. If you want to visit your friend'south house for some piece of work or to become information, y'all demand their accost. The aforementioned thing goes here in this big web world: we accept to give an address of the website which we want to access. The web site is like the house and the URL is the address.

Anatomy of a URL

Now, we know what a URL is only we nonetheless don't know about the parts of a URL. Let's go!

Let's take an example:

https://www.instance.com/page1

Here, the get-go part is 'https'. This basically tells the browser which protocol it should employ. It can be http, https, ftp, etc. A protocol is a set of rules that browser apply for communication over the network. 'https' is basically a secure version, i.e. information is exchanged in a secure mode.

The 2nd part world wide web.case.com is a domain name. You tin chronicle it to your friend's house. It is an address of website. We use information technology to reach to the server (trained reckoner) that is responsible for serving the information for that website. Await! You might call back, a seconds earlier I mentioned URL is the accost whereas I also mentioned domain proper noun is also accost. You may accept been confused. Don't exist dislocated!

Divergence between URL and Domain Name

The major difference between both is that the URL is a complete address. URL tells near the method through which information should commutation, the path after reaching that website. Whereas the domain name is office of a URL.

Let'southward take our previous example to better understand. You lot can say that your friend'southward house accost is a domain name, whereas the URL non only tells the friend'southward house accost (domain name) only too how y'all are going to communicate similar talking in a dissever room (secure) or in front of everyone (info can become leak). It too tells the path, i.e. at which part of the house you lot will go after entering into the firm. Hence, the domain name is part of the URL. A domain name with more information is a URL.

I promise now you are clear with the URL. Permit's get into the next part.

Domain Name

In the previous part, I explained about domain names, merely non in depth. I want you lot to get into it more. Every bit I told you, the Domain name is the address of the website. Information technology gives a unique identity to your website in such a huge web world. No 2 domain names can be the same BUT - Yes! There is 'simply'. This is non the only definition of a domain name. In that location is another story behind information technology. Permit's get into that story.

Equally nosotros know, when we hit any URL or you lot tin can say domain name, then that website gets opened with its content. A server (a trained computer) serves information technology. We as well know that every computer has an IP address which is used for communication over the cyberspace. It is an address as its self explaining 'IP address'. When we hit any URL, then we are actually hitting the IP address of the computer which is responsible for serving the website content (hosting).

Merely, now, you lot might think what the hell...is everything an address? Why does this domain proper name exist if the IP address is there? Why can't we use IP accost to get content of the website?

Yes! You can use IP addresses to become content of the website but actually!.. Would you be able to call back each website's associated IP address? Obviously non! It's difficult to call back the IP accost of every website. That'south why domain names came into the market.

Y'all can relate information technology to your contact list. You can't recall every person's number, merely you lot can remember their name. Aforementioned concept applies here equally well. Yous tin't remember those scary IP addresses, but you can easily retrieve domain names.

This huge amount of data is maintained in a database where the domain name with its IP address is stored. A system that stores domain names with its corresponding IP address is known equally DNS (Domain name system) (I believe y'all must have heard about it).

I remember I take discussed enough basics. At present, go a deep dive into the process of when nosotros hit whatsoever URL.

DNS lookup to detect IP address

After hit the URL, the first thing that needs to happen is to resolve IP address associated with the domain proper name. DNS helps in resolving this. DNS is like a phone book and helps united states to provide the IP address that is associated with the domain name just like our telephone book gives a mobile number which is associated with the person's name.

dns


This is the overview, merely there are 4 layers through which this domain name query goes through. Let's empathise the steps:

one. After hitting the URL, the browser cache is checked. Equally browser maintains its DNS records for some amount of time for the websites you lot have visited earlier. Hence, firstly, DNS query runs here to find the IP address associated with the domain name.

ii. The second place where DNS query runs in OS cache followed by router enshroud.

3. If in the to a higher place steps, a DNS query does not get resolved, then it takes the help of resolver server. Resolver server is nothing but your Isp (Internet service provider). The query is sent to Isp where DNS query runs in Isp cache.

4. If in third steps besides, no results found, then request sends to meridian or root server of the DNS hierarchy. At that place it never happens that it says no results constitute, but actually information technology tells, from where this information you tin get. If you are searching IP accost of the top level domain (.com,.net,.Gov,. org). It tells the resolver server to search TLD server (Pinnacle level domain).

5. At present, resolver asks TLD server to give IP accost of our domain name. TLD stores address information of domain name. It tells the resolver to inquire it to Authoritative Proper noun server.

six. The authoritative proper noun server is responsible for knowing everything virtually the domain name. Finally, resolver (ISP) gets the IP address associated with the domain name and sends it back to the browser.

After getting an IP address, resolver stores it in its enshroud so that next time, if the aforementioned query comes then it does not have to go to all these steps again. Information technology can now provide IP address from their enshroud.

This is all nigh the steps that is followed to resolve IP address that is associated with the domain name. Accept a look below to amend understand:

dns_resolve

TCP connection initiates with the server by Browser

Once the IP accost of the reckoner (where your website information is at that place) is found, it initiates connectedness with it. To communicate over the network, internet protocol is followed. TCP/IP is most common protocol. A connection is built between two using a process called 'TCP 3-mode handshake'. Let's empathize the process in brief:

1. A client computer sends a SYN message means, whether 2nd computer is open for new connection or non.

ii. And then another computer, if open up for new connection, information technology sends acknowledge message with SYN bulletin likewise.

3. After this, beginning computer receives its message and acknowledge by sending an ACK message.

To better  empathize, look below diagram.

process

Communication Starts (Request Response Process)

Finally, the connexion is built between client and server. Now, they both can communicate with each other and share information. After successful connection, browser (customer) sends a request to a server that I want this content. The server knows everything of what response it should ship for every request. Hence, the server responds back. This response contains every information that you requested similar web page, status-code, cache-control, etc. Now, the browser renders the content that has been requested.

That's it! All the above procedure happens when we hit whatsoever URL. Although this lengthy process takes less than seconds to consummate. This is the reply to your question 'what happens when nosotros striking whatsoever URL in a browser?'

Thanks for reading!



Larn to code for free. freeCodeCamp's open up source curriculum has helped more than 40,000 people become jobs as developers. Get started

guythearoolen79.blogspot.com

Source: https://www.freecodecamp.org/news/what-happens-when-you-hit-url-in-your-browser/

0 Response to "When You Go Back to Previous Webpage Does the Get Request Run Again"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel