This is from jQuery API docs:
typeString Default: 'GET' The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers.
I am going to make AJAX delete links with jQuery. What I would like to know is specifics about browser support for DELETE and PUT. Which browsers support it? Is it safer that I just go with POST?
Given that I work in ASP.NET MVC I can decorate my controller actions with both DELETE and POST so both can be accepted.
Go with POST. You don't have to worry about browser support and future maintainers of your code will understand whats going on just fine.
You could go with POST then set a form field named X-HTTP-Method-Override to DELETE.
See SO question #467535 for specific examples:
Is it possible to implement X-HTTP-Method-Override in ASP.NET MVC?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With