哪些浏览器不支持jQuery.ajax的HTTP删除?(复制)

时间:2021-08-31 17:05:32

Possible Duplicate:
Are the PUT, DELETE, HEAD, etc methods available in most web browsers?

可能重复:在大多数web浏览器中,PUT、DELETE、HEAD等方法都可用吗?

The jQuery documentation for jQuery.ajax() says the following:

ajax()的jQuery文档说:

Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers.

注意:其他HTTP请求方法(如PUT和DELETE)也可以在这里使用,但不是所有浏览器都支持它们。

jQuery itself says it supports IE 6.0+, FF 2+, Safari 3.0+, Opera 9.0+ and Chrome. So which (if any) of the above does not support an HTTP DELETE?

jQuery本身表示支持IE 6.0+、FF 2+、Safari 3.0+、Opera 9.0+和Chrome。那么,上面哪个(如果有的话)不支持HTTP删除?

2 个解决方案

#1


22  

The short answer is:

简短的回答是:

All recent browsers (and even old ones) support HTTP DELETE.

所有最近的浏览器(甚至旧的浏览器)都支持HTTP DELETE。

It's not clear why there is this note in the jQuery documentation, unless they are referring to very old browsers like Netscape 1 or IE 2.

不清楚jQuery文档中为什么会有这样的注释,除非它们指的是非常旧的浏览器,如Netscape 1或IE 2。

For information, I've tried an ajax DELETE request in IE6 and even with this browser it works. If it works with IE6, it's safe to assume it works with any other browser.

关于信息,我在IE6中尝试过ajax删除请求,甚至在这个浏览器中也可以使用。如果它与IE6兼容,就可以假定它与任何其他浏览器兼容。

#2


-11  

Chrome. I'm using both PUT and DELETE in my project, in Firefox and Safari everything works fine, but Chrome executes error callback.

铬。我在我的项目中使用PUT和DELETE,在Firefox和Safari中一切正常,但是Chrome执行错误回调。

#1


22  

The short answer is:

简短的回答是:

All recent browsers (and even old ones) support HTTP DELETE.

所有最近的浏览器(甚至旧的浏览器)都支持HTTP DELETE。

It's not clear why there is this note in the jQuery documentation, unless they are referring to very old browsers like Netscape 1 or IE 2.

不清楚jQuery文档中为什么会有这样的注释,除非它们指的是非常旧的浏览器,如Netscape 1或IE 2。

For information, I've tried an ajax DELETE request in IE6 and even with this browser it works. If it works with IE6, it's safe to assume it works with any other browser.

关于信息,我在IE6中尝试过ajax删除请求,甚至在这个浏览器中也可以使用。如果它与IE6兼容,就可以假定它与任何其他浏览器兼容。

#2


-11  

Chrome. I'm using both PUT and DELETE in my project, in Firefox and Safari everything works fine, but Chrome executes error callback.

铬。我在我的项目中使用PUT和DELETE,在Firefox和Safari中一切正常,但是Chrome执行错误回调。