1. Which protocol is used to transfer data in an AJAX request?
2. Which of the HTTP actions is an Ajax XML HTTP request capable of sending to a server?
3. What is the JavaScript syntax for generating an XML HTTP request object and assigning it to the "xhr" variable? Consider only modern browsers, plus IE7 and above.
4. Is it possible to add custom HTTP header to ajax request?
5. What is the difference between the XMLHttpRequest object's .status and .statusText attributes?
6. What is the purpose of Ajax long-polling?
7. For the "same origin policy" to always allow an Ajax request, what attributes must be the same between the requesting context and the server?
8. What is the preferred method for maintaining back/forward button and crawler functionality in Ajax-driven web applications?
9. Which HTML5 feature can improve the experience of a user using the "back" and "forward" buttons when using AJAX techniques?
10. What does the acronym "blob" stand for when referring to data types?
11. In standard JavaScript, what makes asynchronous execution of Ajax calls possible?
12. Which browser features and/or technologies must be enabled, at a minimum, for AJAX techniques to function properly?
13. What are the advantages of using JavaScript libraries (like jQuery) to implement Ajax?
14. The primary benefit of using AJAX techniques in a web application is:
15. Which method on the XMLHttpRequest object is used to send custom HTTP headers with a request?
16. What is the value of the "status" attribute of the completed XMLHttpRequest object if the Ajax request has pulled the response data from the browser cache? Consider only non-IE browsers.
17. The onreadystatechange change event is used to invoke behavior when
18. If an Ajax request loads JSON-formatted responseText into the variable returnedData, what code will turn the data into a readable JSON object in modern browsers, including IE8 and above?
19. True or false? A GET request submitted through Ajax can never cause the server to delete data.
20. Ajax can be used to open a connection from the server to the browser without the browser making an explicit request.
21. How do you manually abort an Ajax request after a certain amount of time?
22. Most JavaScript libraries that provide AJAX support include this header in AJAX requests by default.
23. Can an XMLHttpRequest object be used to receive binary data?
24. What does JSON do?
25. True or false? Ajax can be used to open a connection from the server to the browser without the browser making an explicit request.
26. Can you make an XMLHttpRequest asynchronous call to a page on a different top level domain from the current page's top level domain?
27. Can you perform file uploads using AJAX requests alone?
28. AJAX applications are browser- and platform-dependent!
29. How will the response be parsed if responseType is set to "document" and the request has been made asynchronously?
30. What is the value of the .status attribute of the completed XMLHttpRequest object if the Ajax request needed to follow a server-side redirect before successfully finding the intended resource?
31. If the server is expecting JSON-formatted information in the request, what code will turn the JavaScript object dataToSend into data you can send to the server (consider modern browsers only, including IE8 and above)?
32. What's wrong with the following code? function check_for_request_done() { if (xhr.readyState == 4) { clearInterval(timer); do_something_with_result(xhr); } } var xhr = new XMLHttpRequest(); xhr.open("GET", "/resource", true); xhr.send(); var timer = setInterval(check_for_request_done, 100);
33. What is the name of the object which provides CORS support in Internet Explorer 8 and Internet Explorer 9?
34. What does CORS stand for?
35. What is the CORS-enabled Ajax request object constructor in IE8-9?
36. What is XSS?
37. How can you load JavaScript from a different file into your web application?
38. What is the syntax for the event listener that monitors whether the XMLHttpRequest object's readyState attribute has changed?
39. How does Google recommend you make an Ajax-dependent page accessible to their web crawler?
40. When your Ajax request is complete, what attribute of the XML HTTP request object contains the returned data?
41. What is the proper way to execute a callback function while making a "synchronous" request?
42. How would you configure a *synchronous* GET request to "/resource" after instantiating a new XMLHttpRequest object: var xhr = new XMLHttpRequest();?
43. Which readystate value indicates the response has been fully received from the asynchronous request?
44. What is the technical limitation to implementing user login entirely on the client side using Ajax?
45. According to the W3C specification, which HTTP methods should throw a security exception when used with XMLHttpRequest?
46. Your cross-origin Ajax request is causing your console to throw the error "Resource interpreted as Script but transferred with MIME type application/json. Uncaught SyntaxError: Unexpected token :" What might be happening?
47. After a request completes, which property of the XMLHttpRequest object can be used to retrieve a DOM representation of a remote XML document?
48. Which of these is NOT an advantage of using Ajax over server-side processing?
49. What happens if an Ajax call completes (and calls its callback function) when other JavaScript is currently running?
50. What arguments MUST be supplied to an XMLHttpRequest object's .open() method, and in what order?
51. Ajax is frequently expanded as "asynchronous JavaScript and XML," which is misleading. Which of these words is not central to Ajax's functionality?
52. You're issuing a request to "/resource" using XMLHttpRequest (xhr) where the server returns a 301 or 302 status code, what happens?
53. What HTTP response header is expected in reply to a CORS request?
54. What value of the XMLHttpRequest object's readystate attribute indicates that the response data (i.e. not the headers) is currently being sent back from the server?
55. You've created an XMLHttpRequest object, xhr, and properly called open as well as send on the object. When you check xhr.status and it's 0 and your responseText is null. What's the most likely explanation of what happened?
56. How do you detect errors in Ajax REQUESTS?
57. What XMLHttpRequest method is used to override MIME type returned by the server?
58. How does JSONP work?
59. What HTML attribute would you use to indicate to a screenreader that an element of the page may update (for example, by using Ajax) while out of the user's focus?
60. When receiving an image from the server, the responseType attribute of your XMLHttpRequest object must be set to:
61. Which property of the popstate event contains a copy of the history entry's state object?
62. Sending asynchronous requests is a huge improvement for web developers. Many of the tasks performed on the server are very time consuming. Before AJAX, this operation could cause the application to hang or stop. so, what is the best way to be done by web developers when sending asynchronous requests?
63. What is the value of the response property of XMLHttpRequest object if readyState property equal to 3?
64. In non-IE browsers, what attribute should you check your XMLHttpRequest object for in order to see if it supports CORS?
65. How many types of triggers are present in update panel?
66. What is the 1st method that is fired during the page load?
67. The acronym AJAX stands for _____________________
68. Which of the following is not passed in the request-line?
69. What is the standardized name of JavaScript?
70. Can AJAX be used with HTTPS (SSL)?
71. Can you start multiple threads with JavaScript?
72. Which describe the term 'Asynchronous' correctly?
73. Javascript uses static bindings.
74. In the following list, which ones are used to fetch the result data of an XMLHttpRequest?
75. Which navigator properties is the same in both Netscape and IE?
76. Can AJAX be used with PHP?
77. How can you create an XMLHttpRequest under Internet Explorer 6?
78. which list is/are true regarding AJAX?
79. What is NOSCRIPT tag for?
80. Can an HTML form be sent with AJAX?
81. You want to update the following element with the XMLHttpRequest status. Which of the following approaches is correct for the purpose?
82. Is it possible to make a page 'reload-safe' when using AJAX?
83. The X in AJAX refers to XML, but is it possible to make a request for plain text data by using AJAX?
84. Can WebDav methods like PROPFIND be used with XMLHttpRequest.open()?
85. What is true regarding XMLHttpRequest.abort()?
86. Which HTTP server does AJAX require?
87. Which request types should be used with AJAX?
88. When a user views a page with JavaScript in it, which machine executes the script?
89. Which is/are not addressed by AJAX?
90. Which is not a valid variable name in JavaScript?
91. Which cannot be resolved by using AJAX?
92. Which attribute of the SCRIPT tag can be used to hold the JavaScript version?
93. Can you call responseBody or responseText to get a partial result when the readyState of an XMLHttpRequest is 3(receiving)?
94. function foo () { return 5; } What will the following code do? var myVar = foo;
95. When doing an AJAX request, will the page be scrolled back to top as with normal requests?
96. Correct way to execute the function 'calc()' when an XMLHttpRequest is loaded?
97. Which is/are true regarding AJAX?
98. Can AJAX be used with offline pages?
99. Which is a block comment in JavaScript?
100. It might be needed to set the request content-type to XML explicitly. How can you do so for an XMLHttpRequest Object?
101. Is it always possible to make requests to multiple websites with different domain names from an AJAX client script?
102. Which status codes denotes a server error?
103. Which is drawback of AJAX?
104. Can AJAX be used to move files on the client-side?
105. Is it possible to create and manipulate an image on the client with AJAX?
106. Which browser provide XMLHttpRequest property?
107. When may asynchronous requests be used?
108. What is the third (async) parameter of the XMLHttpRequest open method?
109. Does JavaScript 1.5 have exception handling?
110. Is the loading of an AJAX enabled web page any different from the loading of a normal page?
111. Is it possible to access the browser cookies from a javascript application?
112. Is it possible to make some system calls on the client with AJAX?
113. Can an AJAX application communicate with other applications on the client computer?
114. Can a client AJAX application be used to fetch and execute some JavaScript code?
115. What should be called before 'send ()' to prepare an XMLHttpRequest object?
116. Which language does AJAX use on the server side?
117. Correct way to have the function checkState called after 10 seconds?
118. Correct syntax to create an array in JavaScript?
119. The server returns data to the client during an AJAX postback. Which is correct about the returned data?
120. In the following list, which states are valid? XMLHttpRequest.readyState
121. document.write (Hello'); will pop a dialog box with 'Hello' in it.
122. Which is not a JavaScript operator?
123. What language does AJAX use on the client side?
124. Common way to make a request with XMLHttpRequest?
125. If the code is written using the Core Foundation and Foundation macros, the simplest way to create strings files is:
126. Is JavaScript the same as Java?
127. What is the correct syntax to include a script named myScript.js into a page?
128. Which object can be accessed from JavaScript code?
129. In Javascript, which events can we set?
130. Which is true about onreadystatechange?
131. Complete the following sentence. Using AJAX we can make our web page ___.
132. Full form of AJAX is
133. Which function is used to return specific header information from the server response?
134. Which is true about jQuery.post() method?
135. What will be XMLHttpRequest object 'status' when page was not found?
136. Which is a feature of AJAX?
137. Do AJAX requests retain session information?
138. Which is XMLHttpRequest object methods?
139. Which option should be set in jQuery AJAX call to send a DOMDocument?
140. AJAX has become very commonly used because
141. If $.ajax() is called with the global option set to false, the $.ajaxStart() method will not fire.
142. Which is true about callback function?
143. A callback function is a function passed as a parameter to another function.
144. Which is not a valid data type that AJAX expects to get from server?
145. Which XMLHttpRequest properties are correct?
146. Which JavaScript object performs asynchronous interaction with the server?
147. Can an AJAX response set a cookie?
148. If something goes wrong at the server __ property of request object tell us about it.
149. By default, all AJAX requests are sent asynchronously.
150. How to perform a synchronous AJAX request in jQuery?
151. The jQuery AJAX methods .get(), .post(), and .ajax() all require which parameter to be supplied?
152. Which is not an XMLHttpRequest Method?
153. Which method is available for XMLHttpRequest?
154. Which readyState Object Status is not correct?
155. Which is not a valid XMLHttpRequest Property?
156. LiveWire JavaScript is also called server-side _____.
157. Which answer is correct to send following data with request?
158. To prevent DOM based XSS attacks when JSON is returned in response, which of the following is not correct?
159. __ function returns a JavaScript object that represents an XHTML element
160. To get a list of all elements with class='intro' which can be used?
161. Which JavaScript DOM traversal methods work with an XML Document object?
162. Which JavaScript DOM traversal method works with an XML Document object?
163. How many status of the XMLHttpRequest are there?
164. Difference between XMLHttpRequest and ActiveXObject? variable = new XMLHttpRequest(); variable = new ActiveXObject('Microsoft.XMLHTTP');
165. Which is not a callback hooks provided by $.ajax()?
166. Which is HTTP request headers?
167. Choose the most correct statement to describe Graceful Degradation.
168. How does Crockford's json2.js libary support Graceful Degradation?
169. If an AJAX request made using jQuery fails,
170. Which statement is true for AJAX graceful degradation?
171. .................... stores a function (or the name of a function) to be called automatically each time the readyState property changes.
172. This __ event tells the browser to call the checkUsername() function when the user leaves the username field on the form.
173. Which is valid for addEventListener() method?
174. Which callback hooks is not provided by jQuery AJAX?
175. Correct way to implement GET request using AJAX?
176. For the following code fragment object.property(); choose the option that is correct
177. After all referenced files are loaded and parsed, the browser triggers the _____ event?
178. How do you know that an AJAX request has completed?
179. Your ajax requests are giving you cross site scripting issues, choose the best method below to get around this
180. Which technology is NOT used in AJAX?
181. Which is true about jQuery.get() method?
182. How to make a cross-domain Ajax call?
183. Which is not supported in AJAX?
184. Which may be a disadvantage of using AJAX?
185. How to use Basic Auth with jQuery and AJAX?aja
186. Which request object method can be assigned a callback function which will be called every time the server updates the browser on the request its processing?
187. Which is the correct way to assign events to HTML elements using JavaScript?
188. Which benefit can AJAX provide to Web Applications?
189. Which javascript functions can be used to convert JSON string into object?
190. Which is true for asynchronous requests and response?
191. Which jQuery AJAX function is used to set default values for future AJAX requests?
192. Which numbers, in callback function of request object, can be tested against request.readyState to make sure that server has finished processing request?
193. Which method can be used to delete node from DOM tree?
194. Which statement is true about following code? $.ajax({ method: 'GET', url: 'test.js', dataType: 'script' });
195. Can ActiveXObject work on browsers like Chrome and Firefox?
196. Which property of XMLHttpRequest object holds its status?
197. Fill the correct blanks in following code: Function processXhrChange() { // Check readyState to make sure the XMLHttpRequest has been fully loaded if (Xhr.readyState == ______ ) { // Check status code from server for 'OK' if ( Xhr.status == ______ ) { // Process incoming data // Update our hit counter Hit = hit + 1; } else { // Request had a status code other than 200 Alert ('There was a problem communicating with the server\n'); } }
198. The browser will put 'text' that the server returns in which of the following Request Object property?
199. For the code fragment below function foo() { var httpRequest = new XMLHttpRequest(); httpRequest.open('GET', '/echo/json'); httpRequest.send(); return httpRequest.responseText; } var result = foo(); What will be the value of ‘result’
200. The responseText or responseXML property of the XMLHttpRequest ____?
201. Which is HTTP response headers?
202. Which is General HTTP headers?
203. Which is correct for the term 'Progressive enhancement'?
204. Which XMLHttpRequest Object method returns all the header information?
205. Which method can be used to assign multiple event handlers?
206. For the following code fragment foo(function(r) { // code }); Choose the correct description of the ‘function(r)’
207. For the following code fragment function Foo() { this.data = 42, document.body.onclick = this.method; } Foo.prototype.method = function() { console.log(this.data); }; choose the option that shows the output to the console log
208. What does the getAllResponseHeaders() function do ?
209. Which is NOT a valid method in the key/value pair to configure ajax request in jquery.ajax()?
210. For the code fragment below, function ajax(a,b,c) { c=new XMLHttpRequest; c.open('GET',a); c.onload=b; c.send() } Choose the option that best describes the parameter c
211. Can we make a HTTP POST Ajax call?
212. For the code fragment function x(a,b,e,d,c){ c=new XMLHttpRequest; c.open(e||'get',a); c.onload=b; c.onerror=error; c.send(d||null) } Choose the option that best describes the parameter d
213. Which method is used for cross domain AJAX calls?
214. Choose the best answer to describe ‘Deferred objects’
215. Which is not 'document' object methods?
216. function loadDoc() { varxhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 3 &&this.status == 200) { console.log(this.responseText); } }; xhttp.open('GET', ;'cd_catalog.xml', true); xhttp.send(); }
217. Which will change the class of XHTML element having ID of 'username'?
218. Which can be used to display 'inProcess.png' image while processing request?
219. Which object.method is responsible for writing text to current web page?
220. In an ajax request function callback you have the following code $('#childdiv').html(data); choose the most probable reason why a previous delegated 'click' event no longer functions
221. What does the status == 404 means ?
222. Choose the best statement for the expression JSON.stringify(jsObj);
223. Which will not execute request asynchronously provided usernameRequest object already exists?
224. Choose the statement that best describes the role of the success ‘key’
225. The readyState property in onreadystatechange event equal to 1 means ?
226. choose the option that shows the output to the console log
227. (function worker() { $.ajax({ url: 'ajax/test.html', success: function(data) { $('.result').html(data); }, complete: function() { setTimeout(worker, 5000); } }); })();
228. By default, browsers do not support cross domain AJAX requests.
229. Which method is NOT supported by the XMLHttpRequest object?
230. To check if DOM element 'currentDiv' don't have any child nodes, we can use which one of the following conditions?
231. Correct way to disable register button while request is processing?
232. Which is true about asynchronous request?
233. Which is true to convert AJAX JSON response into object?
234. Which parameter to request.open() are correct?
235. Why would a public api return a non valid json like this? for(;;); {'key1':val1,'key2': 'val2'}
236. Which answer is correct in order to send the following data with request?
237. Can the XMLHttpRequest object be disabled via browser settings?
238. Which object shares a powerful set of methods that can be used to expedite communications between the client and server?
239. How can you stop jQuery AJAX response from being cached?
240. AJAX is used to create a very _____ web interface.
241. How can you send cookies in CORS Ajax call ?
242. var xhttp, xmlDoc, txt, x, i; xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { xmlDoc = this.responseXML; txt = ""; x = xmlDoc.getElementsByTagName("QUESTION"); for (i = 0; i < x.length; i++) { txt = txt + x[i].childNodes[0].nodeValue + " "; } document.getElementById("demo").innerHTML = txt; } }; xhttp.open("GET", "questions.xml", true); xhttp.send();