AJAX Тест Fiver

Which of the following request types should be used with AJAX?

    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

When doing an AJAX request, will the page be scrolled back to top as with normal requests?

    Yes
    No

Consider the following function:
function foo ()
return 5;
}
What will the following code do?
var myVar = foo;

    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

Which of the following is/are not addressed by AJAX?

    Partial page update
    Offline browsing
    Server side scripting
    All of the above

When may asynchronous requests be used?

    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

Can AJAX be used with offline pages?

    yes
    no

What is the correct way to have the function checkState called after 10 seconds?

    window.setTimeout(checkState, 10);
    window.setTimeout(checkState, 10000);
    window.setTimeout(checkState(), 10);
    None of the above

document.write ("Hello");  will pop a dialog box with "Hello" in it.

    true
    false

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?

    Type of request
    Resource to access
    Version of HTTP
    Browser name
    None of the above

Is it possible to make a page “reload-safe” when using AJAX?

    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.

Which of the following is/are true regarding AJAX?

    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

Which of the following cannot be resolved by using AJAX?

    Partial page processing
    Unresponsiveness of web pages
    Server side communication initiation
    Server crashes (failover)
    None of the above

Can a client AJAX application be used to fetch and execute some JavaScript code?

    yes
    no

Which of the following is not a JavaScript operator?

    new
    delete
    this
    typeof
    All of the above are Javascript operators

The X in AJAX refers to XML, but is it possible to make a request for plain text data by using AJAX?

    yes
    no

Is the loading of an AJAX enabled web page any different from the loading of a normal page?

    No
    Yes

Which of the following cannot be resolved by using AJAX?

    Partial page processing
    Unresponsiveness of web pages
    Server side communication initiation
    Server crashes (failover)
    None of the above

Which HTTP server does AJAX require?

    Apache
    Sun application server
    lighttpd
    Microsoft web server
    Any HTTP server will work

Which of the following is a block comment in JavaScript?

    <!– –>
    /* */
    //
    #
    –[[ ]]

Can AJAX be used with HTTPS (SSL)?

    yes
    no

Is it possible to access the browser cookies from a javascript application?

    yes
    no

The server returns data to the client during an AJAX postback. Which of the following is correct about the returned data?

    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

What language does AJAX use on the client side?

    JavaScript
    AppleScript
    PHP
    Ruby
    Java

Which language does AJAX use on the server side?

    JavaScript
    PHP
    Java
    Ruby
    Any language supported by the server

Which of the following is not a valid variable name in JavaScript?

    _my_var
    2myVar
    MY_VAR
    __MyVar2__
    All are valid

What is NOSCRIPT tag for?

    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

What is the standardized name of JavaScript?

    Java
    NetscapeScript
    ECMAScript
    XMLScript
    WebScript

Can AJAX be used with PHP?

    yes
    no

Javascript uses static bindings.

    true
    false

Which of the following are drawbacks of AJAX?

    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

Can an HTML form be sent with AJAX?

    yes
    no

What is the correct syntax to create an array in JavaScript?

    var array = Array.new;
    var array = [];
    var array = new Array;
    var array = new Array ();
    None of the above

Can an AJAX application communicate with other applications on the client computer?

    Yes
    No

What is the correct syntax to include a script named myScript.js into a page?

    <script href=”myScript.js”>
    <script name=”myScript.js”>
    <script src=”myScript.js”>
    <script root=”myScript.js”>

Is it possible to make some system calls on the client with AJAX?

    Yes
    No

Which of the following status codes denotes a server error?

    100
    200
    300
    501
    500

Does JavaScript 1.5 have exception handling?

    yes
    no

When a user views a page with JavaScript in it, which machine executes the script?

    The client machine running the Web Browser
    The server serving the JavaScript
    A central JavaScript server like root DNS
    None of the abov

Which of the following browsers provide XMLHttpRequest property?

    Internet Explorer 5
    Internet Explorer 6
    Internet Explorer 7
    Firefox 2.0
    Safari 3.0

What is true regarding XMLHttpRequest.abort()?

    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 (aborted)
    None of the above

What is the third (async) parameter of the XMLHttpRequest open method?

    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

Which of the following describes the term ‘Asynchronous’ correctly?

    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

How can you create an XMLHttpRequest under Internet Explorer 6?

    var oReq = new XMLHttpRequest ();
    var oReq = new ActiveXObject (“MSXML2.XMLHTTP.3.0”);
    var oReq = new IEHttpRequest (“XML”);
    None of the above

Is JavaScript the same as Java?

    yes
    no

In the following list, which ones are used to fetch the result data of an XMLHttpRequest?

    responseData
    responseBody
    responseString
    responseText
    responseXML

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>

    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.statusCode);
    var myDiv = document.getElementById (“statusCode”); myDiv.status = req.status;
    None of the above

It might be needed to set the request content-type to XML explicitly. How can you do so for an XMLHttpRequest Object?

    myReq.setContentType (“text/xml”);
    myReq.contentType = “text/xml”;
    myReq.overrideContentType (“xml”);
    myReq.contentType = “xml”;
    myReq.setRequestHeader (“Content-Type”, “text/xml”);

Can WebDav methods like PROPFIND be used with XMLHttpRequest.open()?

    Yes
    No

In the following list, which states are valid?
XMLHttpRequest.readyState

    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.

What is the correct way to execute the function “calc()” when an XMLHttpRequest is loaded?

    myRequest.onreadystatechange = calc;
    myRequest.onload = calc;
    myRequest.execute = calc;
    myRequest.addCallback (calc, “loaded”);
    None of the above

Can you call responseBody or responseText to get a partial result when the readyState of an XMLHttpRequest is 3(receiving)?

    Yes
    No

What should be called before ‘send ()’ to prepare an XMLHttpRequest object?

    prepare ()
    open ()
    init ()
    build ()
    None of the above

What is the common way to make a request with XMLHttpRequest?

    myReq.request();
    myReq.get();
    myReq.post(null);
    myReq.send(null);
    myReq.sendRequest(null);

Is it possible to create and manipulate an image on the client with AJAX?

    yes
    no

Is it always possible to make requests to multiple websites with different domain names from an AJAX client script?

    yes
    no

Can you start multiple threads with JavaScript?

    Yes
    No

Can AJAX be used to move files on the client-side?

    Yes
    No

AJAX Fiverr Тест 2020