How to Make It So a Url Never Shows Up 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 bones concept of the web world. Previously, I've written articles on the fancy stuff of today's marketplace, i.e. Athwart journeying, basics of react, etc. But, today, I desire my readers to get into the journey which they encounter at first when they hit any URL.

Equally the topic is cocky explanatory - when nosotros hit any URL then what happens? - let's start!

Before discussing what happens afterwards hit the URL, we must go through what a URL actually is, and what different parts of the URL mean - correct? Without wasting whatever time, let's understand more almost URLs.

URL – Uniform Resource Locator

If y'all expect into its total form, so it is self explanatory: information technology has the location of the resource which we want to access. It is an address of the place where we desire to go to interact with or observe information.

Let'southward look into your daily life. If you want to visit your friend's firm for some piece of work or to get information, you need their address. The same thing goes here in this big web globe: we have to give an address of the website which we desire to admission. The spider web site is similar the house and the URL is the address.

Anatomy of a URL

Now, we know what a URL is just we still don't know about the parts of a URL. Let'due south go!

Permit's have an example:

https://www.case.com/page1

Here, the kickoff role is 'https'. This basically tells the browser which protocol it should use. It tin 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 style.

The 2nd part www.instance.com is a domain proper name. Yous can relate it to your friend'southward firm. It is an accost of website. Nosotros use it to achieve to the server (trained calculator) that is responsible for serving the data for that website. Expect! You might call up, a seconds before I mentioned URL is the accost whereas I also mentioned domain name is also address. You may have been confused. Don't be dislocated!

Deviation between URL and Domain Name

The major difference betwixt both is that the URL is a complete accost. URL tells virtually the method through which data should exchange, the path afterwards reaching that website. Whereas the domain name is part of a URL.

Let'southward take our previous example to ameliorate empathize. You tin can say that your friend's house address is a domain name, whereas the URL not but tells the friend's house address (domain name) just too how you are going to communicate like talking in a separate room (secure) or in forepart of anybody (info can get leak). Information technology also tells the path, i.e. at which part of the house you will go afterwards entering into the house. Hence, the domain name is role of the URL. A domain name with more data is a URL.

I hope now you are clear with the URL. Allow's get into the next part.

Domain Name

In the previous part, I explained about domain names, merely non in depth. I want yous to go into it more. As I told you, the Domain name is the address of the website. It gives a unique identity to your website in such a huge web world. No 2 domain names tin be the aforementioned BUT - Yep! At that place is 'but'. This is not the only definition of a domain name. There is some other story behind information technology. Allow'southward get into that story.

Equally we know, when we hit any URL or you can say domain proper name, so that website gets opened with its content. A server (a trained computer) serves it. We likewise know that every reckoner has an IP address which is used for advice over the cyberspace. It is an accost every bit its self explaining 'IP address'. When we striking any URL, then nosotros are actually hitting the IP address of the computer which is responsible for serving the website content (hosting).

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

Yes! You can utilize IP addresses to get content of the website just really!.. Would you be able to remember each website'south associated IP address? Obviously not! Information technology's difficult to recall the IP address of every website. That'due south why domain names came into the market.

You tin can relate information technology to your contact listing. Yous tin't think every person'due south number, but you can remember their name. Aforementioned concept applies hither as well. You can't call up those scary IP addresses, but you tin can easily recollect domain names.

This huge corporeality of data is maintained in a database where the domain proper name with its IP address is stored. A system that stores domain names with its respective IP address is known as DNS (Domain proper noun organization) (I believe you must have heard almost it).

I recollect I have discussed plenty nuts. Now, go a deep dive into the process of when nosotros hit any URL.

DNS lookup to observe IP address

Later on hitting the URL, the first affair that needs to happen is to resolve IP address associated with the domain name. DNS helps in resolving this. DNS is similar a phone book and helps u.s. to provide the IP address that is associated with the domain proper name just like our telephone book gives a mobile number which is associated with the person's name.

dns


This is the overview, only there are four layers through which this domain proper name query goes through. Let'due south understand the steps:

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

2. The second place where DNS query runs in Bone enshroud followed past router cache.

iii. If in the above steps, a DNS query does non go resolved, and so information technology takes the help of resolver server. Resolver server is nix but your ISP (Internet service provider). The query is sent to Internet access provider where DNS query runs in ISP cache.

iv. If in 3rd steps too, no results found, then asking sends to top or root server of the DNS bureaucracy. There it never happens that it says no results establish, only actually it tells, from where this information you lot can get. If you are searching IP address of the top level domain (.com,.net,.Gov,. org). It tells the resolver server to search TLD server (Top level domain).

5. Now, resolver asks TLD server to give IP address of our domain name. TLD stores address information of domain proper name. Information technology tells the resolver to ask it to Authoritative Name server.

half-dozen. The authoritative name server is responsible for knowing everything nearly the domain name. Finally, resolver (Isp) gets the IP address associated with the domain proper name and sends it back to the browser.

After getting an IP address, resolver stores it in its enshroud so that next fourth dimension, if the same query comes then it does non have to get to all these steps again. It can now provide IP address from their cache.

This is all near the steps that is followed to resolve IP address that is associated with the domain name. Have a await below to better empathize:

dns_resolve

TCP connection initiates with the server by Browser

Once the IP address of the computer (where your website information is at that place) is found, it initiates connexion with information technology. 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 iii-style handshake'. Permit's understand the procedure in brief:

1. A customer computer sends a SYN message means, whether 2d computer is open for new connection or not.

2. Then some other computer, if open for new connection, it sends acknowledge message with SYN message too.

three. After this, starting time computer receives its message and acknowledge past sending an ACK message.

To better  understand, look below diagram.

process

Communication Starts (Request Response Process)

Finally, the connection is congenital betwixt customer and server. At present, they both tin can communicate with each other and share information. Later on successful connexion, browser (client) sends a request to a server that I want this content. The server knows everything of what response information technology should send for every request. Hence, the server responds back. This response contains every data that you lot requested like spider web page, status-code, cache-control, etc. Now, the browser renders the content that has been requested.

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

Thanks for reading!



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

quirkbetheareast36.blogspot.com

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

0 Response to "How to Make It So a Url Never Shows Up Again"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel