$.ajax async:false doesn't work in IE and Firefox, works in Chrome/Safari

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ahmetsan
    New Member
    • Jan 2013
    • 11

    $.ajax async:false doesn't work in IE and Firefox, works in Chrome/Safari

    I am trying to measure download speed with ajax call. Here is the my code
    Code:
    var start = new Date();
    $.ajax ({
        url: 'https://www.example.com/perftest/dummyFile1024',
        cache: false,  
        success : function() {
            var total = (new Date() - start)
            alert(total)    
        },
        error : function(jqxhr, status, ex) {}
    })
    It doesn't wait until whole file loaded. When I add async: false, it waits for loading whole file and I am able to measure bandwidth at chrome and safari however internet explorer and firefox still works the same as async: true, they don't wait until whole file loaded. Do you have any idea how I can manage it works for I.E. and firefox as well? Thanks.
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5388

    #2
    i assume that you use jQuery?



    is it a xdomain-request? or is the dataType jsonp?

    Comment

    Working...