How The Internet and Websites Work

internet

You are a “client.” You want to see a website, and you want to see a website that displays the way you want.

What happens is you (the “client”), using your computer, send a “request” through the internet to another computer (a “server”). This other computer (a “server”) is where the webpage you want is stored (just like you have text and picture documents on your own computer, which other computers could access through the internet if you allowed them to).

You send your first request, commonly, through a “browser” which is a program that is installed on your “device” (computer, phone or other). For example, the Chrome browser usually opens with an automatic request to Google’s server for the Google homepage. This homepage shows up in your browser. The homepage contains a “search box.” When you type something in, like “The Speaker,” Google’s “search engine” is used to find webpages that are relevant to your search term. (The search engine has already spent a lot of time finding and indexing websites based on the content it has read on their pages, so it relies on it’s own existing index to find and display relevant “results.” It also “ranks” these results based on its own ranking formula to show you what it thinks is most relevant first. What it shows you is “hyperlinks,” or, colloquially, “links.” When you click on a link, the browser sends a request through the internet to the server where the webpage lives. The server answers the request by sending the information — which is sent as a bunch of code. The browser can read this code and obeys its commands to display a webpage as an organized collection of pictures and words.

If all there was to get from the server was a single rendition (appearance) of the webpage you wanted, it would send that to you.

But since it’s not 1993, the server is connected to “databases” where more information is stored, and relationships between this information is stored, too. Much database information is like this:

Number Date Title Author
1231 Jan. 1, 2015 China’s Human Rights Violations Tenzen Xi
1232 Jan 2, 2015 Korea Wants Reunification Kim Dae-jung
1233 Jan 4, 2015 Canada’s Immigration Problem Stephen Trudeau
1234 Feb 5 2015 American Help Requested Mohammad Franklin

So the client can ask the server for the earliest article or for all articles in January, or for all articles by Tenzen Xi, or for all articles that contain the word “human rights.”

By Craig Chamberlin

Image by Craig Chamberlin

Similarly, databases can hold information for page display options. 1,000 people make requests to a server for a webpage, but they can all see a different display of that webpage because they have set their settings to display it a certain way. For example, if the webpage has color options, relevant information display options, etc. Some webpages offer a display without images. Some will check your browser to see if it has java and will send a different version if you don’t.

How the server sends for information from the database is a language (called a “scripting language”). This language speaks in computer and says, basically, “find this table, this row, also this row, then display the two rows I asked for.” It sends this language right to your browser, which interprets it (as described above).