HTTP:The Postal Service of the Internet Flashcards
Define protocol
standard for communication between machines
What 3 protocols are used in most web communication
HTTP, TCP/IP, DNS
Define HTTP
(Hypertext Transfer Protocol) High-level web communication. Transfers files such as HTML, CSS, JavaScript, images, and form submissions. Designates how requests and responses should be structured.
Define TCP/IP
Transmission Control Protocol (TCP) and the Internet Protocol (IP) Low-level web communication for transferring small bits of raw data aka packets
What is DNS?
Domain Name Service: Address book for the internet. Translates human friendly names into server addresses
How does HTTPS differ from HTTP?
HTTP protocol with a secure connection. Can’t be read in-transit due to encryption.
Describe the use of packets for transmitting files
Files are broken down into small, standardized chunks of information that are sent and reassembled after reaching their destination
What purpose do domain names serve?
ex: www.launchcode.org
This name is an alias for server IP address
Define IP address
numerical label assigned to each device connected to a computer network
What does it mean to resolve an address?
When a message is addressed to domain name, a lookup is performed on a name server. The message is sent to corresponding IP
Define nameserver
Directory of domains and IP addresses
What is a loopback address?
Alias localhost. Special IP address 127.0.0.1 used by computer to refer to itself
Define URL
Uniform resource locator aka web addresses.
Write a common URL structure
scheme://host:port/path?query_string
Describe scheme
Most often specifies protocol used in making request. Common ones include: http, https, ftp, mailto, file
What function does Host serve in a URL?
portion of URL specifying when request should be sent. Can be IP or domain
Are Port Numbers required in a URL? What function do they serve?
Optional in URL. Port determines specific application on server that should handle request. Conventionally given type of app always uses same port (ex: MySQL uses port 3306). If none specified, default value used based on scheme (http:// is 80, https:// is 443)
Define Path
Tells server what is being requested. If no path specified, root path / is used
What function does a Query String serve?
Provides additional data needed to fulfill request
Top level domain (TLD)
.com, .org, .net - categories of internet, help sort websites and route requests through certain group of servers
What symbol is used for a Fragment, and what role does it play in a URL
Can mark specific spots on a web page, among other things
What role does % Encoding serve in a URL
Help encode special characters in URL
Describe the role of routers in transmitting data
Direct packets of information around the internet. Each time packet encounters a router it’s IP address is added to server request. Server sends back along same path.
What kind of data do requests contain?
- URL requested
- method
- metadata - browser, type of data
- optional request msg
What kind of data do responses contain?
Status line with response code, response headers, blank line, response body
List the categories of response codes
1xx (Informational): The request was received but processing has not finished
2xx (Successful): The request was valid and the server successfully responded
3xx (Redirection): The client should go elsewhere to access the requested resource
4xx (Client Error): There was a problem with the client’s request
5xx (Server Error): The client’s request was valid, but the server experienced an error when fulfilling it
Describe the HTTP Response Code 200
The requested resource exists and was successfully returned
Describe the HTTP Response Code 301
The requested resource has moved, and the client should look for it at the URL included in the Location header.
Describe the HTTP Response Code 404
The server received the request, but the requested resource does not exist on the server.
Describe the HTTP Response Code 500
The server experienced an error while fulfilling the request
Describe the HTTP Response Header Content-Type
The type of data included in the response body. Examples: text/html, text/css, image/jpg
Describe the HTTP Response Header Content-Length
The size of the response body in bytes.
Describe the HTTP Response Header Location
The URL that the client should visit to find a relocated resource.
In developer tools the ____ tab displays all HTTP requests and responses used to load a page. Only tracks the data if page is open during the request
Network