top of page

What is the Internet?

  • Jun 6, 2017
  • 2 min read

Let me ask you this:

"What happens when you type the name of a website like 'google.com' into your browser and press Enter?"

Apparently this is a popular interview question.

Hm, without prior research, my greenhorn answer would look something like this:

Erm, the browser loads the information from a cloud (the probably fuzziest word of the century) and displays it on the computer screen.

Not sure, if this answer is enough to impress the interviewer, so let's unveil some of the mystery and do some research.

What we call the "internet" is actually a bunch of computers connected to each other. It is a network, that passes around information. And they use something called a Response Request Cycle for this communication. So any browser request, like typing in 'google.com' is a response-request-cycle. We are the 'client' who is making a request to a 'host', asking them to give us the website.

To use a restaurant as an example (our lead instructor's favorite analogy - thanks, Tony!): a customer orders a burger and needs the cook in the kitchen to assemble the ingredients and send it to him.

In which part of the process is the request made and what is making the request?

The browser (client) is making an HTTP request and sends it to the host (web server).

What type of request is being made?

The request type is GET: it tells the host that we are asking for information, not sending.

What sends back the response and what is included in the response?

The host/web server receives the request and sends back the pieces that make up the website. These are the 'ingredients' from the kitchen. If the requested webpage needs database information, they need to be retrieved. Another important piece that is sent is the status code.

What is a status code?

A status code indicates if the resource that was requested was found or not. A code of 200 means that it was successfully found. And you've probably seen one of these: 404. The server sends them when it has failed to retrieve the resource.

What does the browser do with the response?

Now that the browser receives the response it is its task to render the web page. It takes the information from the HTML, script and style sheet documents, parses the information and creates a visual representation. This is what we see on our screen. And there we have it: the customer got his burger.

Sources:

https://en.wikipedia.org/wiki/Request%E2%80%93response

http://celineotter.azurewebsites.net/world-wide-web-http-request-response-cycle/

Comments


You Might Also Like:
IMG_20170609_201523
Screen Shot 2017-06-06 at 4.06.27 PM
Screen Shot 2017-06-11 at 11.45.13 AM
IMG_1521
IMG_20170518_185655
IMG_20170519_173940
IMG_20170515_164604
IMG_20170518_183205
IMG_20170518_183126
IMG_20170518_183254
IMG_20170503_153032
IMG_20170518_182930
IMG_20170519_074026
flatiron-school-51
IMG_20170518_183215
Hi,

I am Quynh. Recently, I took an exciting decision: I want to become a software developer.

Follow me on my journey! It starts at a coding bootcamp in New York...

 

Read More

 

bottom of page