473,388 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

$.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
Expand|Select|Wrap|Line Numbers
  1. var start = new Date();
  2. $.ajax ({
  3.     url: 'https://www.example.com/perftest/dummyFile1024',
  4.     cache: false,  
  5.     success : function() {
  6.         var total = (new Date() - start)
  7.         alert(total)    
  8.     },
  9.     error : function(jqxhr, status, ex) {}
  10. })
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.
Jan 21 '13 #1
1 9025
gits
5,390 Expert Mod 4TB
i assume that you use jQuery?

http://api.jquery.com/jQuery.ajax/

is it a xdomain-request? or is the dataType jsonp?
Feb 1 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

17
by: Chaprasi | last post by:
Hi I need help with prototype while doing ajax calls. So this is my JS which does a ajax calls var ajax1 = new Ajax.Request ( url, { method: 'get', parameters: params, onComplete:...
3
by: Erik Cruz | last post by:
Hi. I will start to migrate an asp.net 1.1 application to 2.0. This application uses an Iframe that simply calls a method to update a field on my databse every minute. In order to do this, I...
2
by: Ralph | last post by:
I was playing a little bit with a lot of ajax frameworks. I have even wrote one small by myself. But one thing still drives me crazy: Whenever I'm doing an ajax call I need to specify handler to...
4
RamananKalirajan
by: RamananKalirajan | last post by:
Hi All, I am using Ajax inorder to retrieve a data from the db which is an xml and i am parsing the responseText into an xml. the code what i had tried is working well with IE, but the...
2
by: zamuel | last post by:
Hello people. I have a website portal where I am trying to delete an object, by pressing a button. It does not work and I am getting an error. The HTML part of the request is following: <a...
4
by: maminx | last post by:
hello, i have this function.. function getAllInfoCab() { var slmckdcoy = $("#companyCode").val(); var slmckdcab = $("#branchCode").val(); alert(slmckdcoy); alert(slmckdcab); ...
1
by: javediq143 | last post by:
Hi All, This is my first post in this forum. I'm developing a CMS for my latest website. This CMS is also in PhP & MySQL. I'm done with the ADD section where the Admin can INSERT new records in...
7
Haitashi
by: Haitashi | last post by:
I have a form that calls a function using the onClick event in the submit button. I would like this function to return false if the username is taken. The the original function, which I've tested,...
22
by: Chris G | last post by:
Hi, I have a loop in which I'm making Ajax xmlhttp requests. This occurs within a function triggered by a window.onload event. The Ajax calls are being made with async=false, because they need...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.