HTTP/JavaScript AJAX Flashcards
What is a client?
anyone that requests service from a server
What is a server?
it provides various functionalities, data, and resources to the client
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?
an http method, a requested target (usually a url), the http version
What three things are on the start-line of an HTTP response message?
the protocol version (usually HTTP/1.1), the status code, a status text
What are HTTP headers?
it lets the client pass additional information with an HTTP request or response
Where would you go if you wanted to learn more about a specific HTTP Header?
mdn
Is a body required for a valid HTTP request or response message?
no
What is AJAX?
it allows you to update a part of the page by accessing the data for only that part so that it changes without having to reload the page entirely
What does the AJAX acronym stand for?
Asynchronous JavaScript and XML
Which object is built into the browser for making HTTP requests in JavaScript?
XMLHttpRequest
What event is fired by XMLHttpRequest objects when they are finished loading the data from the server?
the load event is fired
Bonus Question: An XMLHttpRequest object has an addEventListener() method just like DOM elements. How is it possible that they both share this functionality?
prototypal inheritance