Elance Ajax Test Answers
Which protocol is used to transfer data in an AJAX request? Hypertext Transfer Protocol, HTTP Which property of the popstate event contains a copy of the history entry’s state object? state 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); This code is polling a timer rather using the onreadystatechange event to check the state of the async request. In non-IE browsers, what attribute should you check your XMLHttpRequest object for in order to see if it supports CORS? withCredentials What is the value of the response property of XMLHttpRequest object if readyState property equal to 3? null What arguments MUST be supplied to an XMLHttpRequest object’s .op...