Reading over the Restful Rails Development PDF and I had a couple of
questions.
On pg 13 it says that because DELETE isn't supported by browsers, the
DELETE is faked using client-side Javascript. This implies to me that
resource deletion on clients not using Javascript is unsupported. Is
this correct?
If so, is the expectation that the rise of REST will spur browsers to
support the other methods?
It can be faked using a POST (Because DELETE should be protected from
bots & co). You can do that with a button_to helper, which generates
an all-inclusive POST form including the DELETE method. No JavaScript
here.
I've had a look and either I don't understand what I see or I don't like
it. The point of using DELETE or some HTTP method other than GET at any
rate for deleting things is that it keeps search engines from
following -- "clicking" them. The effect would be, and your routes.rb
suggests this, too, that if you let a search engine loose on your app
it will gnaw your database clean in no time.
I think that is the hope, that browsers will support the spec. It surprises me that they don’t since the http 1.1 spec is from June 1999 (hasn’t that been enough time to implement it?) and it would seem that is a simple verb (string) change to support it.