473,396 Members | 1,671 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,396 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 9026
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.