Networking 3 Flashcards

1
Q

Web Servers

A

SW apps that accept and process requests (according to HTTP)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Generic Web Servers (GWS)

A

Multi-purpose apps that serve files which exist in a certain folder on the OS.

Apache and Nginx are the two most popular.

Configured to use a folder as a ‘web root’; that folder will contain the files needed for the website. Should include an index file, e.g. index.html or index.php, that is served when a ‘/’ request is made.

Most of the internet still runs on these.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Advantages of GWS

A
  • Easy to set up

- Require no programming knowledge

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Custom Web Servers (CWS)

A

Purpose-built programs designed to run one specific site.

Instead of serving files directly out of a folder, the routes usually need to be programmed into the software.

The code of the web server will define what happens when a user tries to access a certain path or route.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Ports

A

Typically web servers will listen on either port 80 (HTTP Unencrypted), or 443 (HTTPS Encrypted).

Web servers can be configured to listen on non-standard ports, but that means anyone who needs to access them will need to put the port number at the end of the domain.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

HTTP Requests

A

GET, HEAD, POST, PUT, DELETE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

GET Request

A

Asks to retrieve a specified resource.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

HEAD Request

A

Asks to retrieve a specified resource, but without the response body. In other words, retrieve only the metadata without the data.

This type of request is not common and is more often used when developers are testing their site.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

POST Request

A

Used to send data to the web server without expecting anything back. This is commonly used by HTML forms, for example.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

PUT Request

A

Used to ask the web server to store the data sent in the request at the path requested.

So for example, a PUT request to ‘h​ttps://some-fake-domain.fake/about.html’ would add the data sent to the web server in the PUT request as ‘about.html’ (if authorised). If ‘about.html’ already exists, it is overwritten with the new data.

Also not common.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

DELETE Request

A

Deletes the resource specified in the request (if authorised). Again, this one is not commonly seen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

HTTP Response

A

The HTTP response is split into the response header and the response body.

The response body contains the data that was retrieved.

The request header, on the other hand, will contain metadata about the request, including usually valid request types for that page, the response length, date, name of the server, type of web server being used and so on.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

HTML

A

HTML is a markup language, rather than a programming language. In other words, it is a way of describing data.

HTML uses tags, which are enclosed in less than () signs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Javascript

A

JavaScript is a programming language that is designed to run inside a browser. It can be used to make changes to HTML even after it has been loaded onto the page.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

PHP

A

The difference between PHP and JavaScript is that PHP is executed by the web server and then the result of that execution (usually HTML) is sent as a response to an HTTP request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Cookies (om nom nom)

A

A cookie is a tiny file which a web server can create on a visitor’s computer.

The most common use of cookies is to save a unique identifier, called a session ID, after the login process is complete.

Cookies have an expiry date, which is set by the site when it creates the cookie.

Only the domain that gave you a cookie can ask for that cookie back, so for the most part sites can’t know which other sites you commonly visit. There is one exception to this rule, though, and that is advertising.

17
Q

Local Storage

A

Sites can also store files on your computer (to a 5MB total file size) in the browser’s local storage.