Side navigation
#6557 closed bug (wontfix)
Opened May 11, 2010 08:53AM UTC
Closed May 14, 2010 04:46PM UTC
Last modified March 15, 2012 01:05PM UTC
ajax async: false not honored for remote script loading
Reported by: | gucki | Owned by: | |
---|---|---|---|
Priority: | Milestone: | 1.4.3 | |
Component: | unfiled | Version: | 1.4.2 |
Keywords: | ajax, async, synchronous | Cc: | |
Blocked by: | Blocking: |
Description
$.ajax({
type: 'GET',
url: 'http://api.recaptcha.net/js/recaptcha_ajax.js',
dataType: 'script',
async: false,
success: function() { alert('a'); }
})
alert('b');
The alertt'(b') gets fired before alert('a') which should never happen. Looking into the source it seems that the 'async' option is never used when $a.ajax detects s.dataType === "script" && type === "GET" && remote. See line 5062 of jquery.js
Remote scripts are not handled by XMLHTTPRequest, since XHR cannot be used for cross-domain access. Instead a
tag is injected into the page.I've closed this as wontfix, but it's really cantfix because of the technologies involved.