The World Wide Web:
How the Web Works
Browsers - what do they do?
- A web browser is a computer application that reads files. When entering a domain (ex. https://www.facebook.com) into the URL bar in a browser, the browser requests information in the form of a file associated with the URL input.
- Your browser renders code in the form of a website.
Request - Response
- HTTP stands for Hypertext Transfer Protocol.
- In a nutshell, an HTTP request is sent by the client (a browser), which is used to locate information in the form of a file. * This file contains code, which tells your browser how, and what, to render.
- A web server responds to this request, by telling the browser where the file lives.
HTTP is a protocol that allows clients to communicate with web servers, and is a primary underlying infrastructure of the Internet. The two most common HTTP methods are:
When a URL is inputted, the browser sends a GET request to a web server. When a form is submitted on a website, a POST request is submitted, and the browser hands off the form data to be handled by the web server.
DNS - How it works!
- DNS stands for Domain Name System
- This is a standardized way for a browser to know where your website lives.
- Your browser communicates with a nameserver, which tells your browser the IP address of where the files for your website are located.
- Information on your nameservers are known as DNS Records.
Remember, websites live at an IP Address. This is a string of numbers, (ex. 22.214.171.124). A URL is simply a translation that provides humans with an easy way to remember where a website lives. It is important to remember however, not all websites can be accessed by their IP address. This can be due to security, or other reasons.
Other DNS Info
Your nameservers may also contain other information about your domain, such as where your email server lives. For example, if I try to send an email to firstname.lastname@example.org, your email server is going to communicate with the nameserver for facebook.com and say, "Where does this email server live?".
Examples of Web Code
Web code can be any language used to create web pages or applications. Common examples of these are
- HTML and CSS
For now, we are going to focus on HTML and CSS. This is the most common codebase used for creating webpages, and what is used for virtually all websites.
Browsers and Cross-Compatibility
It is important to note that not all browsers render HTML/CSS equally. We will explore this further later on in the course, however this is important to keep in mind as we move forward.