Client-Server and Ajax Flashcards
What is a client?
Something requesting information, service requesters.
What is a server?
Servers are constantly listening for requests then provide the resource/service to requests.
Which HTTP method does a browser issue to a web server when you visit a URL?
GET method
What three things are on the start-line of an HTTP request message?
Method - type of request it is
Target - where sending the info to
Version - type of HTTP version
What three things are on the start-line (status-line) of an HTTP response message?
Protocol Version - Usually HTTP/1.1
Status Code - indicates success or failure of request
Status Text - purely informational, text description of status code
What are HTTP headers?
Additional information, provide meta data, like the head in a HTML doc.
Is a body required for a valid HTTP request or response message?
Not required.
What is AJAX?
Asynchronous programming practice that uses XMLHttpRequests to load data into part of a page without reloading the whole page.
Which object is built into the browser for making HTTP requests in JavaScript?
The XMLHttpRequest object
What event is fired by XMLHttpRequest objects when they are finished loading the data from the server?
‘Load’ object
An XMLHttpRequest object has an addEventListener() method just like DOM elements. How is it possible that they both share this functionality?
They have a shared object in the prototypal chain.