Bug Tracker

Opened 8 years ago

Last modified 6 years ago

#11013 closed enhancement

Remove async option from $.ajax — at Version 5

Reported by: jaubourg Owned by:
Priority: low Milestone: 1.8
Component: ajax Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking: #10467

Description (last modified by dmethvin)

The async option will allow, if set to false, to make synchronous ajax requests.

It is the worst possible way to make ajax requests (it hangs the javascript VM), it also makes it impossible to implement Deferreds in a truly asynchronous fashion (because we cannot assume ajax is always asynchronous).

Sadly, this synchronous possibility is used internally in jQuery in order to execute script tags with src attributes in html fragments: https://github.com/jquery/jquery/blob/master/src/manipulation.js#L350

However this will not work for cross-domain, so I think we could very well "remove" this feature and document everything properly.

Change History (5)

comment:1 Changed 8 years ago by jaubourg

Component: unfiledajax
Description: modified (diff)
Keywords: 1.8-discuss added
Milestone: None1.8
Priority: undecidedlow

comment:2 Changed 8 years ago by jaubourg

Summary: Remove async options from $.ajaxRemove async option from $.ajax

comment:3 Changed 8 years ago by jaubourg

Blocking: 10467 added

comment:4 Changed 8 years ago by jaubourg

Description: modified (diff)

+1

comment:5 Changed 8 years ago by dmethvin

Description: modified (diff)

+1, Deprecate yes, remove no (at least not any time soon). People might think twice about using a deprecated feature which is our goal here.

Note: See TracTickets for help on using tickets.