DEV Community

Cover image for Now I now know why I Can access Facebook from anywhere in the world
Ibrahim Alausa
Ibrahim Alausa

Posted on

Now I now know why I Can access Facebook from anywhere in the world

So, I am actually learning the fundamentals of the internet from www.internetfundamentals.com and the first lesson is about client and servers. To solidify my understanding, I’m trying to explain to myself with this note by using Facebook as a case study.

If Mark Zuckerberg designed facebook from his computer, how come I have access to the same application from Nigeria?
Is he making use of some kind of computer that can be accessed from anywhere in the world?
But, wait a minute, he definitely can’t be using the same computer system he was using back then right?..ooh...I get it..he just transferred the files to his new system with a flash drive and did some kind of configuration I don’t know about on his new system to make Facebook available for anyone in the world.

At least that’s what I thought Mark Zuckerberg did until I heard about these two words CLIENT and SERVER. As web developers, we build our applications with computer systems that are right in front of us (Client), but how do we make them accessible to anyone, anywhere in the world? It turns out that we need to actually move these apps to a place or should I say another system that has the ability to make sure someone from an entirely different continent has access to our app (Server).

Well, at least now I know Mark Zuckerberg used a client computer to build Facebook and then moved it to a server so I can have access to it from Nigeria. Thanks, Mark.

What happens when I want to view the home page of facebook

From what I understand so far, here’s an illustration describing the interaction between my computer system(client) and the computer system where Mark Zuckerberg uploaded the files containing facebook’s code.
When I type in www.facebook.com on the address bar, it initiates a conversation between my system (client) and the server and it’s something like this.

My computer: Hey server, I need the homepage of Facebook, can you help me with that?

Server: Here you go buddy, here’s the homepage.

Facebook homepage

Let’s clarify here, the server does not actually send the homepage as we see in the image, it sends a bunch of files that are interpreted by the browser to form the homepage we see. We can actually take a look at all the files sent by the server after our request was made..yeah!!!

I am actually using google chrome browser, but I am sure the commands might be similar for other browsers.
press Command+Option+C (Mac) or Control+Shift+C (Windows, Linux).
Navigate to the network tab and reload the page

Now, we can see the files, images, fonts that make up the Facebook homepage.

Dev tools network tab

Let’s play with this a little.

Right-click on the first CSS file and select BLOCK REQUEST URL to exclude the file when the page reloads.
Dev tools network tab

Now RELOAD the page and see how our facebook homepage looks like after blocking that CSS file

Facebook page with only little CSS

Woow...This is what my facebook homepage looks like after excluding that CSS file from loading.

This is my basic understanding of how we access websites from anywhere in the world. If there’s any correction you feel I should make or any additions, I’ll appreciate the feedback. Thanks.

Top comments (0)