google.com, pub-8658045329707802, DIRECT, f08c47fec0942fa0
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

AJAX Test Answers 2019


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

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

3. Consider the following function: function foo () { return 5; }
What will the following code do? var myVar = foo;
Answers:
• Assign the integer 5 to the variable myVar
• Assign the pointer to function foo to myVar
• Do nothing
• Throw an exception
• None of the above

4. Which of the following status codes denotes a server error?
Answers:
• 100
• 200
• 300
• 501
• 500

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

6. Javascript uses static bindings.
Answers:
• true
• false

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

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


9. Which HTTP server does AJAX require?
Answers:
• Apache
• Sun application server
• lighttpd
• Microsoft web server
• Any HTTP server will work

10. What language does AJAX use on the client side?
Answers:
• JavaScript
• AppleScript
• PHP
• Ruby
• Java

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

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

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

14. document.write («Hello»); will pop a dialog box with «Hello» in it.
Answers:
• true
• false

15. How can you create an XMLHttpRequest under Internet Explorer 6?
Answers:
• var oReq = new XMLHttpRequest ();
• var oReq = new ActiveXObject («MSXML2.XMLHTTP.3.0»);
• var oReq = new IEHttpRequest («XML»);
• None of the above

16. In the following list, which states are valid? XMLHttpRequest.readyState
Answers:
• 0, The request is not initialized
• 1, The request has been set up
• 2, The request has been sent
• 3, The request is in process
• 4, The request is complete
• All of the above.

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

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

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

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

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

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

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

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

25. 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:
• Type of request
• Resource to access
• Version of HTTP
• Browser name
• None of the above

26. 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
• It contains both the data of the whole page and the data that needs to be changed in separate blocks
• It contains the data of the whole page
• It may contain anything — раньше был этот
• None of the above

27. What is NOSCRIPT tag for?
Answers:
• To prevent the page scripts from executing
• To shield a part of a page from being modified by JS (like aDiv.innerHTML = ‘something’ has no effect)
• To enclose text to be displayed if the browser doesn’t support JS
• NOSCRIPT tag doesn’t exist
• None of the above

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

29. What is the correct syntax to include a script named myScript.js into a page?
Answers:
• <script href=»myScript.js»>
• <script name=»myScript.js»>
• <script src=»myScript.js»>
• <script root=»myScript.js»>

30. What is the correct way to execute the function «calc()» when an XMLHttpRequest is loaded?
Answers:
• myRequest.onreadystatechange = calc;
• myRequest.onload = calc;
• myRequest.execute = calc;
• myRequest.addCallback (calc, «loaded»);
• None of the above

31. What is the third (asynс) parameter of the XMLHttpRequest open method?
Answers:
• If true, the request doesn’t return anything.
• If true, the javascript engine is blocked while making the request
• If true, the send method returns immediately
• If true, the request object is destroyed when ‘send’ is executed
• If true, callbacks are executed

32. What should be called before ‘send ()’ to prepare an XMLHttpRequest object?
Answers:
• prepare ()
• open ()
• init ()
• build ()
• None of the above

33. When a user views a page with JavaScript in it, which machine executes the script?
Answers:
• The client machine running the Web Browser
• The server serving the JavaScript
• A central JavaScript server like root DNS
• None of the above

34. Which of the following are drawbacks of AJAX?
Answers:
• The browser back button cannot be used in most cases
• It makes the server and client page representation synchronization more difficult
• It loads the server too much
• It’s not supported by older browsers
• It augments the used bandwidth significantly

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

36. Which of the following is/are not addressed by AJAX?
Answers:
• Partial page update
• Offline browsing
• Server side scripting
• All of the above

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

38. When may asynchronous requests be used?
Answers:
• To submit data to the server
• To retrieve data from the server
• To load additional code from the server
• To download an image
• All of the above

39. Which language does AJAX use on the server side?
Answers:
• JavaScript
• PHP
• Java
• Ruby
• Any language supported by the server

40. Which of the following cannot be resolved by using AJAX?
Answers:
• Partial page processing
• Unresponsiveness of web pages
• Server side communication initiation
• Server crashes (failover)
• None of the above

41. Which of the following describes the term ‘Asynchronous’ correctly?
Answers:
• Ability to handle processes independently from other processes
• Processes are dependent upon other processes
• Processes are not fully dependent on other processes
• None of the above

42. Which of the following is a block comment in JavaScript?
Answers:
• <!— —>
• /* */
• //
• #
• —[[ ]]

43. Which of the following is not a JavaScript operator?
Answers:
• new
• delete
• this
• typeof
• All of the above are Javascript operators

44. Which of the following is not a valid variable name in JavaScript?
Answers:
• _my_var
• 2myVar
• MY_VAR
• __MyVar2__
• All are valid

45. 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.statusCode;
• var myDiv = document.getElementById («statusCode»); myDiv.innerHTML = req.status;
• var myDiv = document.getElementById («statusCode»); myDiv.setStatus (req.statusCod• ;
• var myDiv = document.getElementById («statusCode»); myDiv.status = req.status;
• None of the above

46. In the following list, which ones are used to fetch the result data of an XMLHttpRequest?
Answers:
• responseData
• responseBody
• responseString
• responseText
• responseXML

47. What is the correct syntax to create an array in JavaScript?
Answers:
• var array = Array.new;
• var array = [];
• var array = new Array;
• var array = new Array ();
• None of the above

48. What is true regarding XMLHttpRequest.abort()?
Answers:
• It can only be used with async requests
• It will remove the onreadystatechange event handler
• It will send an abort message to the remote server
• It changes readyState to 4 (aborte•
• None of the above

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

50. What is the standardized name of JavaScript?
Answers:
• Java
• NetscapeScript
• ECMAScript
• XMLScript
• WebScript

51. 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 server side scripting language used to serve partial parts of a webpage
• It’s a good way to reduce network traffic, if used correctly
• None of the above

52. Which of the following list is/are true regarding AJAX?
Answers:
• It can only be implemented with the XMLHttpRequest object
• It can be used to update parts of a webpage without reloading it
• It can be used to make requests to the server without blocking the user (asyn•
• It requires a special AJAX enabled web server
• It cannot be used under Internet Explorer

53. 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)
• HTTP POST request for retrieving data (which will not change for that URL)
• HTTP GET should be used when the state is updated on the server
• HTTP POST should be used when the state is updated on the server

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

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

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

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


No comments:

Post a Comment