Side navigation
#7019 closed bug (invalid)
Opened September 09, 2010 08:13PM UTC
Closed December 03, 2010 07:53AM UTC
Last modified March 13, 2012 10:53PM UTC
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.
Attachments (0)
Change History (7)
Changed October 03, 2010 02:18AM UTC by comment:1
cc: | → snover |
---|---|
priority: | → low |
Changed October 15, 2010 02:13AM UTC by comment:2
keywords: | DELETE, readyState, onreadystatechange → DELETE readyState onreadystatechange needsreview |
---|
Changed October 15, 2010 07:10PM UTC by comment:3
Replying to [comment:1 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.
Changed October 15, 2010 11:15PM UTC by comment:4
status: | new → open |
---|
Changed October 16, 2010 01:08AM UTC by comment:5
Replying to [comment:3 MoonScript]:
Replying to [comment:1 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.
Changed November 19, 2010 02:55AM UTC by comment:6
owner: | → 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.
Changed December 03, 2010 07:53AM UTC by comment:7
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.