JS Web Development Flashcards
What is JSON?
a universally readable data interchange format that follows JavaScript object syntax
What are serialization and deserialization?
serialization: converting an object into a string
deserialization: turning the string back into the same object
Why are serialization and deserialization useful?
useful because they let you send data in a universally readable format
How do you serialize a data structure into a JSON string using JavaScript?
JSON.stringify()
How do you deserialize a JSON string into a data structure using JavaScript?
JSON.parse()
What is a client?
The application that is requesting a service or function
What is a server?
The application that is providing a service or resource
Which HTTP method does a browser issue to a web server when you visit a URL?
GET
What three things are on the start-line of an HTTP request message?
- The HTTP method (ex. GET, POST, DELETE, PUT, etc)
- Request target (a url including any query string)
- The HTTP version
What three things are on the start-line (aka status line) of an HTTP response message?
- The protocol version
- A status code/response code indicating success or failure of request (ex 200, 404)
- A status text; a brief human-readable description of status code (ex. ‘Not Found’, ‘OK’)
What are HTTP headers?
HTTP headers let the client or server pass additional information with an HTTP request or response.
Is a body required for a valid HTTP request or response message?
No, the message body is optional
What is AJAX?
Anything that makes a request to an outside source and then updates a web page after it has been loaded.
Ajax allows you to request data from a server and load it without having to refresh page
What does the AJAX acronym stand for?
Asynchronous Javascript and XML
This is what the letters literally stand for; but the term AJAX as it’s used today does not specifically mean this.
Which object is built into the browser for making HTTP requests(network requests) in JavaScript?
The XMLHttpRequest object