#7019 closed bug (invalid)
AJAX DELETE request never completes in IE
Reported by: | MoonScript | Owned by: | MoonScript |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | ajax | Version: | 1.4.2 |
Keywords: | DELETE readyState onreadystatechange needsreview | Cc: | snover |
Blocked by: | Blocking: |
Description
When you issue an AJAX DELETE request, IE stops at readyState 2 (headers received), so the success/error/complete callback functions never get executed. This makes sense since DELETE (and PUT) requests should return an HTTP 204 (No Content) response, so there is no body. You might have to add another else-if in your onreadystatechange handler when the request type is 'DELETE', to fire the success and complete callbacks when readyState === 2. Or, in a future version of jQuery, provide another $.ajax option that would provide the means to override the onreadystatechange handler with your own custom code.
Note: I kept getting an 'Unspecified error' in IE when I tried to check the XHR's status property at readyState 2, so I was never able to call the error callback.
Change History (7)
comment:1 follow-up: 3 Changed 12 years ago by
Cc: | snover added |
---|---|
Priority: | → low |
comment:2 Changed 12 years ago by
Keywords: | needsreview added |
---|
comment:3 follow-up: 5 Changed 12 years ago by
Replying to snover:
Does the DELETE call to the server actually succeed? Methods other than GET and POST have traditionally not been well-supported across all browsers.
Yes, the DELETE request does hit the server successfully. I am able to monitor the HTTP traffic using Fiddler, and I can see the request being made, and the HTTP 204 response being received.
Also, I just verified that the same problem is happening in the Safari browser (not Chrome, though). It stops at readyState===2.
comment:4 Changed 12 years ago by
Status: | new → open |
---|
comment:5 Changed 12 years ago by
Replying to MoonScript:
Replying to snover:
Does the DELETE call to the server actually succeed? Methods other than GET and POST have traditionally not been well-supported across all browsers.
Yes, the DELETE request does hit the server successfully. I am able to monitor the HTTP traffic using Fiddler, and I can see the request being made, and the HTTP 204 response being received.
Also, I just verified that the same problem is happening in the Safari browser (not Chrome, though). It stops at readyState===2.
P.S. I am also seeing this problem in Safari when using the PUT method.
comment:6 Changed 12 years ago by
Owner: | set to MoonScript |
---|---|
Status: | open → pending |
We haven't gotten very far without code. Can you provide some? A jsfiddle test case would be ideal but if you have something site-specific please put a page up there.
comment:7 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
Does the DELETE call to the server actually succeed? Methods other than GET and POST have traditionally not been well-supported across all browsers.