[whatwg] A thought: <a href="..." method="post">

Ian Bicking ianb at colorstudy.com
Fri May 6 15:55:13 PDT 2005


I was just thinking about the recent problems introduced by the Google 
Web Accelerator following links that have side effects (the typical <a 
href="form?delete=10">[delete this]</a> stuff).  One of the issues is 
that doing the Right Thing means creating a form, and that effects the 
UI, and of course the nesting form issue and all that.  The Web Forms 
spec deals with this some, with the action attribute for submit buttons 
and some other details.

A related extension might be a method attribute to anchor tags.  One 
might expect <a href="form?delete=10" method="POST">[delete this]</a> to 
do a post request to "form" with a request body of "delete=10".  Or it 
could do a post with an empty request body, but unfortunately a large 
number of web frameworks ignore URL variables in post requests.

The benefit is that this would be easy to apply to current applications, 
would generally be backward compatible with all user agents (as long as 
the server respected GET responses), and can be implemented in 
Javascript fairly easy.  And for many applications this is purely a 
template change, not requiring any server code changes.  The Google Web 
Accelerator will still be broken (the method attribute wouldn't 
magically appear on all the many applications out there), but at least 
conscientious web developers would have a fairly simple option to do the 
right thing.

Anyway, just an idea that occurred to me; I tried searching the archives 
a bit and didn't notice anything on the topic.

-- 
Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org



More information about the whatwg mailing list