Google Chrome: XMLHttpRequest.send() not working while doing POST.
        Posted  
        
            by Dave Van den Eynde
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Dave Van den Eynde
        
        
        
        Published on 2010-01-07T17:04:43Z
        Indexed on 
            2010/03/14
            21:35 UTC
        
        
        Read the original article
        Hit count: 1083
        
I'm working on an application that allows the user to send a file using a form (a POST request), and that executes a series of GET requests while that file is being uploaded to gather information about the state of the upload.
It works fine in IE and Firefox, but not so much in Chrome and Safari.
The problem is that even though send() is called on the XMLHttpRequest object, nothing is being requested as can be seen in Fiddler.
To be more specific, an event handler is placed on the "submit" event of the form, that places a timeout function call on the window:
window.setTimeout(startPolling, 10);
and in this function "startPolling" sequence is started that keeps firing GET requests to receive status updates from a web service that returns text/json that can be used to update the UI.
Is this a limitation (perhaps security-wise?) on WebKit based browsers? Is this a Chrome bug? (I'm seeing the same behaviour in Safari though).
© Stack Overflow or respective owner