Web Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is Rest

A

( Representational State Transfer) A set of design principles for making network communication more scalable and flexible.

  1. Client-Server - A network must be made up of clients and servers.
  2. Stateless - Clients and servers do not need to keep track of each other state. Servers do not keep records of requests.
  3. Uniform Interface - ensures that there is a common language between servers and clients that allows each part to be swapped out or modified without breaking the entire system. 4 sub-constraints: identification of resources, manipulation of resources through representations, self-descriptive messages, and hypermedia.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What happens when you type an address into your browser?

A

Your browser makes a GET request to that URI. If it receives a 200 OK response and an HTML document back, then it renders the page in the window so that you can view it.

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

What is the DOM?

A

Document Object Model - an API by which JavaScript code can access the HTML content of a page.

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

What does Status Code 200 mean?

A

OK General status code. Most common code used to indicate success.

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

What does Status Code 400 mean?

A

Bad Request -
The request cannot be fulfilled due to bad syntax. General error when fulfilling the request would cause an invalid state.

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

What does Status Code 403 mean?

A

Forbidden - Error code for user not authorized to perform the operation or the resource is unavailable for some reason (e.g. time constraints, etc.).

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

What does Status Code 409 mean?

A

Conflict - Whenever a resource conflict would be caused by fulfilling the request. Duplicate entries and deleting root objects when cascade-delete is not supported are a couple of examples.

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

What does Status Code 500 mean?

A

The general catch-all error when the server-side throws an exception.

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

What does Status Code 201 mean?

A

Created - The request has been fulfilled and resulted in a new resource being created.

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

What does Status Code 204 mean?

A

No Content - The server successfully processed the request, but is not returning any content.

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

What does Status Code 304 mean?

A

Not Modified - Indicates the resource has not been modified since last requested.

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

What does Status Code 401 mean?

A

Unauthorized - Error code response for missing or invalid authentication token.

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

What does Status Code 404 mean?

A

Not Found - Used when the requested resource is not found, whether it doesn’t exist or if there was a 401 or 403 that, for security reasons, the service wants to mask.

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

What are the technical pros and cons of localStorage, sessionStorage, session and cookies, and when would I use one over the other?

A

In terms of capabilities, cookies, sessionStorage, and localStorage only allow you to store strings - it is possible to implicitly convert primitive values when setting (these will need to be converted back to use them as their type after reading) but not Objects or Arrays (it is possible to JSON serialise them to store them using the APIs). Session storage will generally allow you to store any primitives or objects supported by your Server Side language/framework.

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

What is is XXS?

A

Cross-site Scripting (XSS) refers to client-side code injection attack wherein an attacker can execute malicious scripts (also commonly referred to as a malicious payload) into a legitimate website or web application.

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

What is a CSRF Attack?

A

Cross Site Request Forgery (CSRF) is an attack whereby a malicious entity tricks a victim into performing actions on behalf of the attacker. CSRF attacks take advantage of the fact that a web application completely trusts a user, once it can confirm that the user is indeed who they say they are.