Deck 11: Updating Web Pages With Ajax
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Match between columns
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/41
Play
Full screen (f)
Deck 11: Updating Web Pages With Ajax
1
An HTTP response code of 200 indicates that the request was successful.
True
2
____ refers to the temporary storage of data for faster access.
A) Caching
B) Salting
C) Shadowing
D) Hashing
A) Caching
B) Salting
C) Shadowing
D) Hashing
A
3
The first line of an HTTP message specifies the date.
False
4
The ____ header specifies how a web browser should cache any server content it receives.
A) Caching
B) Cache-Control
C) CacheLevel
D) Cached
A) Caching
B) Cache-Control
C) CacheLevel
D) Cached
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
5
You can use a server-side script as a proxy to access data from another domain.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
6
Every web page is identified by a unique address called the ____.
A) host string
B) host
C) URL
D) HTTP
A) host string
B) host
C) URL
D) HTTP
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
7
The term ____ refers to the application, usually a web browser, that makes the request.
A) HTTP server
B) host
C) HTTP URL
D) HTTP client
A) HTTP server
B) host
C) HTTP URL
D) HTTP client
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
8
A(n)____ is a data source made available on one domain for use on other domains across the web.
A) AJAX request
B) web service
C) HTTP service
D) DHTML service
A) AJAX request
B) web service
C) HTTP service
D) DHTML service
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
9
After you instantiate an XMLHttpRequest object, you use the ____ method with the instantiated XMLHttpRequest object to specify the request method (such as GET or POST )and URL.
A) alive()
B) create()
C) instantiate()
D) open()
A) alive()
B) create()
C) instantiate()
D) open()
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
10
The term ____ refers to a computer system that is being accessed by a remote computer.
A) protocol
B) host
C) client
D) URL
A) protocol
B) host
C) client
D) URL
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
11
HTTP client requests and server responses are both known as HTTP ____.
A) messages
B) scripts
C) strings
D) queries
A) messages
B) scripts
C) strings
D) queries
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
12
Ajax gets its name from the fact that when it was first used, it was practical only with JavaScript and ____.
A) ActiveX
B) DOM
C) XML
D) HTTPS
A) ActiveX
B) DOM
C) XML
D) HTTPS
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
13
By combining the ____ object with DHTML techniques, you can update and modify individual portions of your web page with data received from a web server.
A) AjaxRequest
B) XMLHttpRequest
C) HttpRequest
D) XMLRequest
A) AjaxRequest
B) XMLHttpRequest
C) HttpRequest
D) XMLRequest
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
14
You can use a server-side script as a ____ to access data from another domain.
A) proxy
B) switch
C) router
D) firewall
A) proxy
B) switch
C) router
D) firewall
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
15
The XMLHttpRequest object can be used to request and receive data without reloading a web page.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
16
The term ____ is another name for a web server and refers to a computer that receives HTTP requests and returns responses to HTTP clients.
A) URL
B) HTTP client
C) HTTP server
D) host
A) URL
B) HTTP client
C) HTTP server
D) host
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
17
The purpose of the ____ policy is to prevent malicious scripts from modifying the content of other windows, tabs, and frames and prevent the theft of private browser information and information displayed on secure web pages.
A) privacy
B) proxy
C) delegation
D) same-origin
A) privacy
B) proxy
C) delegation
D) same-origin
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
18
The XMLHttpRequest object uses ____ to exchange data between a client computer and a web server.
A) HTTP
B) FTP
C) HTTPS
D) SSL
A) HTTP
B) FTP
C) HTTPS
D) SSL
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
19
____ define information about the request or response message and about the contents of the message body.
A) Queries
B) Tags
C) Headers
D) Labels
A) Queries
B) Tags
C) Headers
D) Labels
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
20
CORS is supported by all browsers in use today.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
21
Match between columns
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
22
Why do you need access to a web server when developing an Ajax application?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
23
A(n)____________________ request allows JavaScript to continue processing while it waits for a server response.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
24
A web server's reply to a request is known as the ____________________.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
25
Why is the Cache-Control header important for Ajax applications?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
26
Are synchronous or asynchronous responses more resistant to server problems? Why?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
27
What are the four steps in using Ajax to update data?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
28
How does CORS work?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
29
____ requests JSON content using a script element rather than an XMLHttpRequest object.
A)JSON-P
B)CORS
C)proxy
D) XDomainRequest
A)JSON-P
B)CORS
C)proxy
D) XDomainRequest
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
30
All the information needed to create a JSON-P request is packaged into the URL specified for the ____________________ attribute of the script element.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
31
To improve performance, you should call the ____ method of the XMLHttpRequest object to cancel any existing HTTP requests before beginning a new one.
A) exit()
B) abort()
C) cancel()
D) delete()
A) exit()
B) abort()
C) cancel()
D) delete()
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
32
Why should you not include an API key in public JavaScript code?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
33
How can you create an asynchronous request with JavaScript?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
34
The value of the responseText property is almost always a(n)____ string.
A)XML
B)XHTML
C)JSON
D)HTML
A)XML
B)XHTML
C)JSON
D)HTML
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
35
Why is it important to use JSON-P only with a web service that you trust?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
36
How can a proxy be useful with Ajax?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
37
____________________ is a set of rules that defines how requests are made by an HTTP client to an HTTP server, and how responses are returned from an HTTP server to an HTTP client.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
38
After you have defined the basic request criteria, you use the ____ method with the instantiated XMLHttpRequest object to submit the request to the server.
A) pass()
B) request()
C) send()
D) call()
A) pass()
B) request()
C) send()
D) call()
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
39
Unlike standard HTTP requests, which usually replace the entire page in a web browser, the ____________________ object can be used to request and receive data without reloading a web page.
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
40
A(n)____ request stops the processing of the JavaScript code until a response is returned from the server.
A) asynchronous
B) global
C) domain
D) synchronous
A) asynchronous
B) global
C) domain
D) synchronous
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck
41
Why is it generally a good practice to reuse an instantiated XMLHttpRequest object?
Unlock Deck
Unlock for access to all 41 flashcards in this deck.
Unlock Deck
k this deck