Search code examples
gm-xmlhttprequest

set synchronous:false in GM_xmlhttpRequest not works


I'm tried make an http request with synchronous as false in GM_xmlhttpRequest but does not seem to work.

how do this? my code:

GM_xmlhttpRequest({
        method: "GET",
        url: "http://www.google.com/",
        synchronous:false,
        onload: function(xhr) 
            {
                if(xhr.readyState == 4) {
                    r = xhr.responseText;
                }   
            }

    });

Thanks in advance!


Solution

  • GM_xmlhttpRequest is asynchronous by default.

    http://wiki.greasespot.net/GM_xmlhttpRequest