Getting Started Guide: Chapter 1

How does the Internet work?

How does the Internet work?

Now that you know how the front end is tied together with the back end, it’s a good time to take a closer look at how the web works.

We all use the Internet (most likely) every day – but what is it really? How does it all work?

There’s an extremely helpful video right here about the very basics that you should watch. If you’re confused about the whole topic, the video will answer quite a few questions.

What is the Internet?

Simply put, the Internet is a wire buried in the ground. It might be made of fiber optics, copper, or these days also beamed via satellites or cell phone networks.

A wire? Doesn’t sound too glamorous.

Why is the Internet so useful then if it’s just a wire? Because any two or more computers connected to this wire can communicate with each other.

p

Summary

  • The Internet is simply an infra­structure that allows computers connected to it to communicate with each other

What is a web server?

A server is a special computer connected directly to the Internet. Also, the server’s hard drive stores any documents that should be accessible via the Internet.

You can think of a server as a landlord for websites. When you create a website and need space for your documents, you rent it from a server for a given period time.

Moreover, your web server not only stores and hosts your website files. It also knows what to do whenever someone wants to visit your website. It makes it accessible for everyone connected to the Internet. When your website is visited, the serves retrieves the correct files from the storage space.

I’m connected to the Internet, Is my computer a server?

No. The computers you and I use daily aren’t servers, since they aren’t directly connected to the Internet. Our “regular” computers are called clients, since they are connected indirectly to the Internet through an Internet Service Provider (ISP).

Let’s assume you use your computer at home and wish to visit a website via your DSL connection. You connect to the Internet via your ISP, which in turn allows you to access the website, i.e. the files on a web server that you request via your web browser.

How is data transferred via the Internet?

Data travels on the Internet in small packets. For example, an image file is chopped into smaller pieces when it’s sent. Once it reaches its destination via the Internet, the data bits are patched together again.

Let’s imagine you and your best friend are both using your DSL connection at your place. You have two computers that use your ISP, but you are visiting two different websites using your laptops. You are on Facebook, your friend is checking their emails at Gmail. How does Facebook’s server know which laptop to send the files to that you requested? And how does Gmail’s server know how not to display your friend’s emails to your laptop screen?

The solution is IP addresses and routers. Everything connected directly or indirectly to the Internet, has a unique IP address. Everything – laptops, computers, cell phones, servers. At any point where two or more parts of the Internet intersect, there is a device called a router.

Routers direct information packets, or files, through the Internet. They get send data packets one step at a time towards their final destination, like your laptop, for example.

So when you log on to Facebook, your laptop sends data to Facebook’s server. Each router that the data packet meets along the way adds its own “stamp” to the packet. That way, when Facebook’s server sends a data packet back to you in return, it follows the same router path like the breadcrumbs Hansel and Gretel used.

What is an IP address?

Every server has a unique internet protocol address, or IP address. Just like a postal address for mail, IP addresses help computers find each other.

Each device, like a computer or a cell phone, that is using a Transmission Control Protocol/Internet Protocol (TCP/IP) network, has this unique identifier.

What is a domain name?

The IP address consists of a unique string of numbers. Since such strings are difficult to remember for us humans, we can alias an IP address with a more readable name called a domain name.

For instance, mikkegoes.com is the domain name used on top of my website’s IP address. Thus, using the domain name is the easiest way for us to reach a computer over the Internet.

What is a Domain Name Server (DNS)?

DNS is like a phone book for the Internet. Basically, the DNS is the complete collection of domains and their registered IP addresses, all stored in a giant database. This distributed system allows other computers to know where to find your website.

What is the World Wide Web (WWW)?

What’s the difference between the WWW and the Internet? Good question!

These two terms are often used interchangeably, but in fact they are far from being the same thing. The WWW is not the Internet.

Remember how the Internet is more of a technical infrastructure which allows billions of computers to be connected to each other. The WWW is simply a service built on top of of that infrastructure.

The Web stands for a collection of hypertext documents that are linked together – these documents include websites like the one you’re visiting now. Of course, your favourite web applications are also part of this enormous collection of hypertext documents that make up the web.

In short, the Internet simply provides a means to access these documents, e.g. with your web browser.

p

Summary

  • The WWW consists of all the documents that are linked together via the Internet
  • The Web is simply a service built on top of the infrastructure offered by the Internet

What is a URL?

Now we know that the WWW is a collection of documents – text files, images, videos, style sheets, database tables and much more.

Every document on the Web that is accessible through the Internet need a unique web address, which is called the Uniform Resource Locator or URL. It is simply an address or a reference to a resource on the Internet.

The Web stands for a collection of hypertext documents that are linked together – these documents include websites like the one you’re visiting now. Of course, your favourite web applications are also part of this enormous collection of hypertext documents that make up the web.

In short, the Internet simply provides a means to access these documents, e.g. with your web browser.

What is a web browser?

Chrome, Firefox, Safari, Opera, Internet Explorer – they’re all web browsers. But what do they do exactly?

A web browser is a tool that is used to present a web page to a curious visitor.
Whenever you surf online and wish to open a specific web page, your browser sends a request to the server and their hard drive where the files are stored that make up that exact web page.

After that, the server sends these files to your web browser, which then in turn displays the contents together with their styling and interactive elements to you.

All of the most popular web browsers and their different versions display and render HTML and CSS in a slightly different way. So when you are viewing your web page in Firefox and it’s looking great, it doesn’t necessarily mean that your page works that well for a Safari user.

Therefore, it’s a crucial part of any website project to thoroughly test the website with different browsers.

Conclusion

I hope you found some useful information in this section of this chapter. Even though the massive infrastructure for communication offered by the Internet isn’t something you need to think about daily, it’s a good idea to understand how it all works.

The main takeaway here is that the Internet is not the WWW. Also, at latest when you create and launch your own website, it’s helpful to know what’s happening in the background.

What’s next?

In the next part of this chapter, we’ll take a look at some tools and software that are necessary or helpful for learning coding.

HI THERE!

HOW ABOUT A FREE E-BOOK?

Sign up now and get 15 awesome tips for learning coding more quickly and easily!

Yay, thanks for subscribing! Please check your email to confirm your subscription and to receive your download link.

Share This