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. 220.127.116.11). 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 email@example.com, 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
The above languages run inside the web browser (aka "the client side"). On the server side, there is a lot more variation. You may encounter...
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.