- From: Rybec Arethdar <rybecarethdar@gmail.com>
- Date: Sat, 14 Feb 2015 19:18:18 -0700
- To: public-html@w3.org
- Message-ID: <CAJTfVtz14FKjWeyEJfrwj8KaYrQgK5S+vcVK12DQwa+6iYQJtQ@mail.gmail.com>
I am responding to this as a result of searching for why a popular modern browser will not let me use the DELETE method in a form. I have read some of the original justifications for removing it from the HTML5 specifications, and frankly I think they are bogus. In the case of the DELETE method, this is completely true, as it is absurd to be forced to write an AJAX request to handle something so simple. I want to briefly discuss my particular application to show why I personally think this functionality is necessary. I am maintaining and refactoring an application that uses partial REST syntax and partial form/query string syntax. While this particular application could probably have been done better with more REST and less form/query string, it would still be necessary to send data using these. The back end uses a database for storage. It is storing primarily text data. I am not using the PUT method, though until I learned that it could not be used in forms, I was seriously considering it. To update database records (which are the REST resources for the application), a PUT request on a form would have been ideal (which contradicts one claim that PUT requests do not need payloads). Because some of the resource data is sent through query strings or as form input, using DELETE requests from forms would also have saved me a great deal of time. As it is, I will have to write out the AJAX routine for sending DELETE requests (*with* the payload that I supposedly do not need) manually, because I cannot put in a simple form with a single button that will handle this all for me. (And lest anyone believe that AJAX is better for DELETE for other reasons, please consider that if you hit a "Delete" button on the resource page for a specific REST resource, the site will need to send you to another page anyway, because that resource page is no longer valid.) Now, I am not actually to any of the stuff above yet. Right now, I am working on adding DELETE request handling to the REST server I am writing to serve this and other rest applications I am working on. The reason I discovered this problem (and it *is* a problem for me) is that I was trying to test the server by writing a very simple web page that would make a DELETE request. Evidently, I am going to have to write up a full AJAX call (which is less trivial than it should be) just to run a simple test to make sure my server will catch DELETE requests. (And I don't want to clutter my server with redirect code, as so many others do, to get around this limitation. Frankly, I should not have to, for behavior that should work intuitively.) Those who originally decided to eliminate these requests from HTML5 had one fatal flaw in their reasoning: They assumed that they knew exactly how everyone needed to use the various request methods. Unfortunately, many of us now have to do a lot of extra work to use things the way they should have been made in the first place. Anyhow, while it really won't help me on my current project, I would very much like to see this problem fixed. I guess now I have to go back and write up my AJAX call to test a simple DELETE request handler on my server. Thanks for listening! Rybec -- べん
Received on Tuesday, 17 February 2015 08:05:24 UTC