Opened 9 years ago
Last modified 7 years ago
#11013 closed enhancement
Remove async option from $.ajax — at Version 8
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 )
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 (8)
comment:1 Changed 9 years ago by
Component: | unfiled → ajax |
---|---|
Description: | modified (diff) |
Keywords: | 1.8-discuss added |
Milestone: | None → 1.8 |
Priority: | undecided → low |
comment:2 Changed 9 years ago by
Summary: | Remove async options from $.ajax → Remove async option from $.ajax |
---|
comment:3 Changed 9 years ago by
Blocking: | 10467 added |
---|
comment:4 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:5 follow-up: 6 Changed 9 years ago by
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.
comment:6 Changed 9 years ago by
Replying to dmethvin:
+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.
No, the goal would be to remove the option so that we are sure to only have asynchronous ajax requests. Deprecating sadly won't solve any problem.
comment:7 Changed 9 years ago by
Status: | new → open |
---|
comment:8 Changed 9 years ago by
Description: | modified (diff) |
---|
-1, I agree it's bad, but unfortunately used far too often
+1