The Internet began initially as a U.S. military project during the 1970s — an exploration into how to build a reliable and resilient communication network that would continue working even if parts of it were not always working (e.g., infrastructure destroyed during a war). The project came up for a method for computers to talk to each other through a common protocols. University researchers from across the country (including in Michigan) were highly involved in the project. Although the Internet began as a military and research project, it began much more public during the 1990s along with the explosion of personal computing.
The most common way people use the Internet is with their web browser (Google Chrome, Safari, Firefox, etc.). When you enter a website’s uniform resource locator (URL) into the search bar, you are navigating the Internet. There are several layers of work being done when you search for a website. Glossing over specifics, there are a few important steps:
While the initial request that gets sent to a server is generally for HTML, there are other content types that a server can send for a website. For example, after the initial HTML page loads, the client will also want to render image files, styles and programs that add to the visual and interactive nature of a website. In the modern web, there will also be advertisements and analytics tracking scripts included. The client will have to then make subsequent requests to the server to retrieve that content. As the number of file requests increases, the longer the website takes to load.
<aside> 🎒 Figure out how to open your browser’s web development tools in order to view network requests. Open the network request panel and visit a website. Notice the number of requests that a client has to send to a server.
</aside>
Browsers are especially made for ease of use in interacting with the Internet. However, there are other ways to interact with websites.
Type the following command into your terminal:
curl <https://www.michigandaily.com>
After you click enter, you will see a lot of text appear. This is the HTML representation of The Michigan Daily’s front page. Try scrolling up throughout the terminal to see if you can recognize some of the content on the page.
We’ve already gotten to know the GET request for retrieving content from a server. The other common action is POST, which allows a client to send data to a website to manipulate something on a website. For example, when publishing an article on The Michigan Daily, we have to click the publish button. When clicking this button, the client sends a POST request to the server, indicating to the server that we want to publish a specific article. Then, the server will run some part of their program to perform that action. There is also a DELETE action which is typically used to delete something from a server. In browsers, you typically send a POST or DELETE request by clicking on some button for submitting a form.
If you click around the network requests made in your browser, you will notice that there are always numbers associated with each request. These are codes that indicate how a client request was processed.