How The Internet Works

Your first steps into the world of web development.

How The Internet Works

Who doesn't use the internet nowadays? I can't think of anyone around me except maybe some really old Grandpa living in some forest somewhere. Lol. However, a better question would be, do you know how the Internet really works? Do you know what happens when you open your Twitter account in your browser? In this article, we'll look at how the internet works from when you request a web page until you finally see it displayed on your screen. But first...

What is the Internet? (A physical look)

world-submarine-cable-map.png

Seems like an easy question right? But pause for a second and try to define it in your own words. It was a bit difficult for me to form the words too :).

In simple terms, the internet is a simple network of optical fiber cables connected across the entire world. These cables run on the ocean floor to every continent (insane right?). They start from huge data centers which have powerful computers called servers and go possibly across the world to your Wifi router in some cases. However, nowadays most people use wireless connections, right? So where do these cables go? Well, the cables connect to antennas set up by ISPs(Internet Service Providers) in your local area, which convert the light signals to wave signals which your phone or laptop can then pick up to access the internet.

Parts Of The Internet

pexels-pixabay-356043.jpg

Before we get to explaining how the internet works, we also need to understand some parts of the internet just so we get it out of the way and the story rides on smoothly.

  • Browser: A computer program that helps your access the internet in a Graphic User Interface(GUI). e.g Google Chrome.
  • URL: Stands for Uniform Resource Locator which is the full address of a webpage. e.g https://www.twitter.com
  • Domain Name: The name of a website that is incorporated into a URL e.g twitter.com
  • IP Address: IP stands for Internet Protocol. An IP address is a weird-looking address assigned to every computer. This address identifies a computer like a home address identifies a house.
  • Internet Service Provider(ISP): The company you where you get your internet subscription from. eg AT&T.
  • Domain Name System(DNS) server: A computer somewhere in the world that matches domain names to IP addresses.

Quick note: Domain names were created to name websites because they are more human-readable than IP addresses which look cryptic. However, websites can also be accessed using these IP addresses (for those who can memorize them :D).

How The Internet(Web) Works?

macbook-459196_1280.jpg

Now that we know what the internet is and the infrastructure that makes it possible, let's finally talk about the basic process that takes place when we use the internet. We'll look at what happens from when your type in a URL in your browser window, until a webpage, finally appears on your screen.

Once you hit Enter after typing the URL for the website you're looking for, your computer(browser) sends a request to your ISP. The ISP sends a request to a DNS server that matches the domain name in your URL to the IP address of the server where the website is hosted. The DNS returns this IP address to the ISP which sends it back to your browser.

Now that your browser has the address of the server, it uses it to make a request to the server via all the internet infrastructures (Computer -> ISP -> Optic fiber Cables -> Server) requesting the files it needs to display the website. The server then sends back a response containing all the requested files (HTML, CSS, and JAVASCRIPT files) in a reverse route back to the browser.

The browser parses the HTML file first and starts building the skeleton of the website. It then encounters link(s) to CSS or JavaScript files which it also parses and executes which results in a beautiful website on your screen :D (hopefully, lol). This entire process takes place in a matter of milliseconds or seconds for slow internet connections.

That's it for now people :). Now that you know how the web works, you're a step into beginning your amazing journey into web development. Hope you enjoyed this content. I would love to hear your thoughts. Please leave a comment down below.