Upwork Test Answers: Get all the correct answers of most recent and possible Upwork Tests A to Z (Updated on Jan, 2016)
Cover Letter Templates: These cover letter samples are not only for Upwork job, but also you will have some idea about your real life job
 
Freelance Profile Overviews: Different Profile samples and overviews of experts, advanced and intermediate level freelancers
For Newbie of Upwork: Upwork Help - How to apply for a job in Upwork with 10 most important articles about Upwork

A to Z View - All Upwork Test Answers

Upwork AJAX Test Answers - Part 2

1. Which of the following is/are true regarding AJAX?
 Answers: • It's an engine developed by Microsoft to load web pages faster
 • It's merely a concept with many implementation methods (XMLHttpRequest, iFrames...)
 • It's a good way to reduce network traffic, if used correctly

 2. Which of the following browsers provide XMLHttpRequest property?
 Answers: • Internet Explorer 7 or • Firefox 2.0 or • Safari 3.0

 3. What is true regarding XMLHttpRequest.abort()?
 Answers: • It can only be used with async requests or • It will remove the onreadystatechange event handler

 4. What is the third (async) parameter of the XMLHttpRequest open method?
 Answers: • If true, callbacks are executed

 5. What is the correct way to have the function checkState called after 10 seconds?
 Answers: • window.setTimeout(checkState, 10000);

 6. document.write ("Hello"); will pop a dialog box with "Hello" in it.
 Answers: • false

 7. The format of an HTTP request is given below:

 <request-line>
 <headers>
 <blank line>
 [<request-body>]

 Which of the following is not passed in the request-line?
 Answers: • None of the above

 8. Is it possible to make a page "reload-safe" when using AJAX?
 Answers: • yes, if each AJAX request modifies the server side context, which would render a page similar to the actual JS modified page, if reloaded.

 9. How can you create an XMLHttpRequest under Internet Explorer 6?
 Answers: • var oReq = new ActiveXObject ("MSXML2.XMLHTTP.3.0");

 10. The X in AJAX refers to XML, but is it possible to make a request for plain text data by using AJAX?
 Answers: • yes


 11. In the following list, which ones are used to fetch the result data of an XMLHttpRequest?
 Answers: • responseXML

 12. Is it possible to create and manipulate an image on the client with AJAX?
 Answers: • yes

 13. Is it always possible to make requests to multiple websites with different domain names from an AJAX client script?
 Answers: • yes

 14. Is it possible to make some system calls on the client with AJAX?
 Answers: • No

 15. Is the loading of an AJAX enabled web page any different from the loading of a normal page?
 Answers: • Yes

 16. You want to update the following element with the XMLHttpRequest status. Which of the following approaches is correct for the purpose?
 <div id="statusCode"></div>
 Answers: • var myDiv = document.getElementById ("statusCode"); myDiv.innerHTML = req.status;

 17. Which HTTP server does AJAX require?
 Answers: • Any HTTP server will work

 18. Which of the following is a block comment in JavaScript?
 Answers: • /* */

 19. It might be needed to set the request content-type to XML explicitly. How can you do so for an XMLHttpRequest Object?
 Answers: • myReq.setRequestHeader ("Content-Type", "text/xml");

 20. Does JavaScript 1.5 have exception handling?
 Answers: • yes

 21. Which of the following cannot be resolved by using AJAX?
 Answers: • Server crashes (failover)

 22. Can AJAX be used with HTTPS (SSL)?
 Answers: • yes

 23. Which of the following list is/are true regarding AJAX?
 Answers: • It can be used to update parts of a webpage without reloading it

 24. Can WebDav methods like PROPFIND be used with XMLHttpRequest.open()?
 Answers: • Yes

 25. Which of the following request types should be used with AJAX?
 Answers: • HTTP GET request for retrieving data (which will not change for that URL)

 26. When may asynchronous requests be used?
 Answers: • All of the above

 27. Can AJAX be used with offline pages?
 Answers: • yes

 28. Is it possible to access the browser cookies from a javascript application?
 Answers: • yes

 29. Can a client AJAX application be used to fetch and execute some JavaScript code?
 Answers: • no

 30. Which of the following is not a JavaScript operator?
 Answers: • All of the above are Javascript operators

 31. The server returns data to the client during an AJAX postback. Which of the following is correct about the returned data?
 Answers: • It only contains the data of the page elements that need to be changed

 32. When doing an AJAX request, will the page be scrolled back to top as with normal requests?
 Answers: • No

 33. What language does AJAX use on the client side?
 Answers: • JavaScript

 34. Can AJAX be used with PHP?
 Answers: • yes

 35. Javascript uses static bindings.
 Answers: • false

 36. Which of the following is not a valid variable name in JavaScript?
 Answers: • 2myVar

 37. Is JavaScript the same as Java?
 Answers: • no

 38. What is NOSCRIPT tag for?
 Answers: • To enclose text to be displayed if the browser doesn't support JS

 39. In the following list, which states are valid?

 XMLHttpRequest.readyState
 Answers: • All of the above.

 40. What is the standardized name of JavaScript?
 Answers: • ECMAScript

 41. Which language does AJAX use on the server side?
 Answers: • Any language supported by the server

 42. Which of the following is/are not addressed by AJAX?
 Answers: • Offline browsing

 43. Which of the following are drawbacks of AJAX?
 Answers: • The browser back button cannot be used in most cases

 44. What is the correct way to execute the function "calc()" when an XMLHttpRequest is loaded?
 Answers: • myRequest.onreadystatechange = calc;

 45. Can an HTML form be sent with AJAX?
 Answers: • yes

 46. What is the correct syntax to create an array in JavaScript?
 Answers: • var array = new Array ();

 47. Can you call responseBody or responseText to get a partial result when the readyState of an XMLHttpRequest is 3(receiving)?
 Answers: • No

 48. Can an AJAX application communicate with other applications on the client computer?
 Answers: • No

 49. Which of the following describes the term 'Asynchronous' correctly?
 Answers: • Ability to handle processes independently from other processes

 50. What is the correct syntax to include a script named myScript.js into a page?
 Answers: • <script src="myScript.js">

 51. Consider the following function:

 function foo ()
 {
 return 5;
 }

 What will the following code do?

 var myVar = foo;
 Answers: • Assign the pointer to function foo to myVar

 52. What should be called before 'send ()' to prepare an XMLHttpRequest object?
 Answers: • open ()

 53. Can you start multiple threads with JavaScript?
 Answers: • No

 54. What is the common way to make a request with XMLHttpRequest?
 Answers: • myReq.send(null);

 55. Can AJAX be used to move files on the client-side?
 Answers: • No

 56. Which of the following status codes denotes a server error?
 Answers: • 500

 57. When a user views a page with JavaScript in it, which machine executes the script?
 Answers: • The client machine running the Web Browser

No comments:

Post a Comment