Part 2 - How the Web works Flashcards
Name the four layers in internet protocol
- Application Layer
- Transport Layer
- Internet Layer
- Link Layer
Describe the function of the link layer
- Physical transmission of data across media
- Establish logical links
Describe the function of the internet layer
Provides “best effort” communication
How many bits are in an IPv4 address?
32
How many bits are in an IPv6 address?
128
Describe the function of the transport (TCP) layer
Ensures transmissions arrive in order and without error
What is the function of HTTP in the application layer?
Hyper Text Transfer Protocol. Web communication
What is the function of SSH in the application layer?
Secure Shell Protocol. Remote command-line connections to servers
What is the function of FTP in the application layer?
File Transfer Protocol. File transfer between computers
What is the function of POP/IMAP/SMTP in the application layer?
Email protocols for transferring and storing emails
What is the function of DNS in the application layer?
Domain Name System. Resolves domain names to IP addresses
Explain domain name address resolution if the browser has not cached the IP
- URL passed to OS’s DNS resolver
- Resolver makes request to ISP’s DNS server
- The primary DNS server checks its DNS cache
- Primary DNS server (if IP is not cached) requests IP from root name server
- Root name server returns IP of name server for requested TLD
- The primary DNS can now request the IP of the name server for requested website from TLD name servers
- Name server returns IP of the DNS server for requested site
- Primary DNS server requests IP of requested site from the site’s DNS server
- IP address of requested site returned to Primary DNS server
- IP address of requested site returned to computer
- Browser requests page from IP
- Browser displays website
What is a URL?
Uniform Resource Locator
Name, in order, the parts of a URL, starting with something like http://
- Protocol
- Domain
- Path
- Query string
- Fragment
What is the function of the domain in a URL?
Name of the server that resources are requested from
If the domain is not know, what can be used in a URL to request data from a specific server?
IP address
How can a port number be specified in the domain?
Adding a colon after the domain, and specifying a port number
What is the function of a fragment in a URL?
It is a way of requesting a specific part of a page, for example an article
How can you identify the start of the query string in a URL?
Look for the question mark ?
In the following query string, identify the delimiters, keys, and values: ?username=john&password=abcdefg
Delimiters: ? &
Keys: username, password
Data: john, abcdefg
What is the difference between request and response headers in HTTP?
- Request headers include data about the client machine
- Response headers have information about the server
answering the request and the data being sent
Name and shortly explain two request methods in HTTP
POST - post info to the server (optional): request resources based on that information
GET - request resources from the server (hyperlinks)
Broadly, what do the response codes starting with 2,3,4 & 5 mean?
- 2## codes are for successful responses,
- 3## are for redirection-related responses,
- 4## codes are client errors,
- 5## codes are server errors.
Can a web browser display a styled website containing 2 images with a single request?
No. Each resource needs to be requested individually. The browser can only display the page once all resources have arrived
Shortly explain browser caching
A web browser will cache resources in order to render frequently visited websites faster. The browser checks that every single cached resource is fresh when completing a request. If not fresh, the browser will request that resource again
What is a web server?
A computer that responds to HTTP requests
Name the four components of an application stack on a web server
- Operating system
- Web server software
- Database
- Scripting language for dynamic requests
What forms the LAMP software (application) stack?
- Linux operating system
- Apache web server
- MySQL database
- PHP scripting language
What is the difference between an AJAX and HTML request?
AJAX stands for asynchronous javascript and XML so if you are using javascript to load data after the browser request has finished you are doing AJAX. A simple HTML request is static
What is CAPTCHA and why is it used?
Completely Automated Public Turing Test to tell Humans and computers Apart. Used to ensure that automated systems do not alter resources that are only supposed to be altered by users.
What is URL encoding?
URL encoding converts characters into a format that can be transmitted over the Internet
What is character encoding?
A character encoding tells the computer how to interpret raw zeroes and ones into real characters.
In terms of character encoding, what is a code point?
A code point is the atomic unit of information. Each code point is a number which is given meaning by the Unicode standard
In terms of character encoding, what is a code unit?
A code unit is the unit of storage of a part of an encoded code point. In UTF-8 this means 8-bits, in UTF-16 this means 16-bits. A single code unit may represent a full code point, or part of a code point.
In terms of character encoding, what is a grapheme?
A grapheme is a sequence of one or more code points that are displayed as a single, graphical unit that a reader recognizes as a single element of the writing system