< Previous
Next >

[Comments] (5) : Does anyone know why the HTML standard doesn't allow PUT or DELETE as form actions? Sure, they're not widely used, but neither is the form's TITLE attribute, or the KBD tag, and they're in there.

Filed under:


Posted by Steve Jenson at Tue Feb 08 2005 13:22

It looks like XForms won't be allowing them, either. That's too bad. The semantics of PUT _are_ a little weird to fit into forms, since you wouldn't really PUT a form to a URI. But DELETE seems perfectly acceptable, just don't expect your form values to be used for anything.

Posted by David Wilson at Fri Feb 11 2005 12:32

title = text [CS]
This attribute offers advisory information about the element for which it is set.

Values of the title attribute may be rendered by user agents in a variety of ways. For instance, visual browsers frequently display the title as a "tool tip" (a short message that appears when the pointing device pauses over an object). Audio user agents may speak the title information in a similar context.

So at the least, it's an accessibility thing. But more generally, removing the title attribute from a form would break the inheritance structure present in the HTML standard.

Posted by Aaron Swartz at Fri Feb 11 2005 18:05

What would you do with the contents of the form on DELETE?

And since PUT would probably need to end up putting the x-form-encoded text as the document to a static URL, it'd be _really_ rare.

Posted by Leonard at Fri Feb 11 2005 22:38

I say you can implement the semantics of PUT or DELETE however you want, just like you can implement POST however you want.

Posted by Leonard at Fri Feb 11 2005 23:00

Specifically, the page you PUT to doesn't have to be static. All PUT does is create the resource you're PUTting to. It's up to the server how the resource is stored and how the encoded data is transformed into the resource.

Similarly, if you submitted a DELETE command to a resource and it was accepted, that resource would stop existing. It would turn into a 404 or 410. It doesn't have to be that a file on disk stopped existing.

[Main] [Edit]

Unless otherwise noted, all content licensed by Leonard Richardson
under a Creative Commons License.