#6557 closed bug (wontfix)
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
Change History (2)
comment:1 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 Changed 13 years ago by
I've updated the documentation for $.ajax to clarify that async: false
cannot be used for cross-domain requests.
Note: See
TracTickets for help on using
tickets.
Remote scripts are not handled by XMLHTTPRequest, since XHR cannot be used for cross-domain access. Instead a
script
tag is injected into the page.I've closed this as wontfix, but it's really cantfix because of the technologies involved.