Jan 16
Don Box has written about GData and INVOKE and how HTTP headers are used to get across the meaning of DELETE, PUT, etc.
This isn’t the only way it can work, but in fact is a degradation if a firewall is blocking DELETE and friends.
Rails is getting simply restful, and is doing its own pragmatic hacks to get across various methods on clicks.
Maybe 2007 is time for browsers to support all of the HTTP methods in a nice way. Maybe we can have a standard way to <a href=”….” method=”delete”>>nuke it</a>
January 16th, 2007 at 10:06 pm
I read somewhere that HTML 5 is going to support DELETE and PUT. I wouldn’t expect any browsers to support DELETE or PUT via HTML 4.x, since that would be outside the spec.
One approach that I would bet will catch on is for people to use javascript to scan the HTML and look for things (like Rails’ hidden input field called _method) and dynamically add onsubmit event handlers to the form. When the form is submitted, the event can fire and submit a real PUT or DELETE request via AJAX.
January 17th, 2007 at 3:54 am
Here’s one interesting topic. Can a FORM element support PUT? Is an anchor the correct element to execute a DELETE function? Maybe these two methods aren’t really useful to model user interactions.
Of course, doing it with Ajax is another story: we have access to HTTP header fields and can handle several special status codes (such as 409/Conflict) in meaningful ways.
January 17th, 2007 at 3:43 pm
Tiago, I don’t think an achor is the correct element to execute a DELETE function. The anchor has traditionally been associated with GET requests, which are supposed to be safe. If we suddenly change this we’ll have users clicking on what they think are hyperlinks and accidentally deleting things.