Method for A?

Problem description:

HTML has a number of ways to specify the source of a hyperlink.  Prior
to HTML 4.0, they were the A and FORM elements. Even if there is only
one element in the form, the two have different renderings and
different behaviors in some browsers.

HTTP, on the other hand, has two ways to request an object that is the
destination of a hyperlink: GET and POST. These two methods have
different semantics, and have a different set of acceptable actions at
the server.

The METHOD attribute of the FORM tag allows the author to select which
of the two HTTP method to use to request the target, allowing the
author to select the most appropriate set of semantics. 

The A tag has no such attribute, nor any other method to let the
author select which of the two HTTP methods should be used.  When an
author wishes the UA behavior or rendering of the A tag, but the
application at the server has the semantics of the POST method, the
author is stuck. They must either live with an undesired
rendering/behavior, or have the server application violate the HTTP
spec.


Proposed solution:

Give the A tag a METHOD attribute, identical to that attribute of the
POST tag. This allows the author to specify which of the two (or more,
if they should appear in later versions of HTTP) HTTP methods to use,
and thereby inform the UA which set of semantics the server will have
for this object.


Compatability:

HTML sources that predate this change should not have a METHOD
attribute on any A tag. Since the METHOD attribute defaults to the GET
method, which the A tag uses in current HTML standards, there will be
no change in UA behavior for these documents.

User agents that predate this change should ignore the METHOD
attribute and use the GET method. This may mean that the UA and the
server don't agree on the semantics of the requested object.  While
this is undesirable, it's also the only current option when when the A
tags UA behavior/rendering is desired for a hyperlink source whose
destination has POST semantics.

In summary, it is expected that old documents will work as before in
browsers that support this feature, and old browsers will work as
before when browsing documents that use this feature.


Testing:

The author of AWeb[1] was kind enough to add support for this feature
to a beta test version of that browser. That version has been in
general use here since it's release, with no problems related to the
introduction of this feature. I have heard no reports from other beta
testers of problems introduced by this feature.

One internal application that ran into problems with the
non-orthognality of A and FORM was changed to include "METHOD=POST" on
all A tags. It has been used daily since that time from a number of
different UAs. The improved version of AWeb has worked flawlessly.
Unimproved browsers worked no worse than before.

In summary, things worked as expected, and the testing provided no
reason not to add this feature to HTML in general.


HTML 4.0:

HTML has features that allow the author to have a UA request an object
without making it the source of a hyperlink, such as the IMG element.
Some may cause let the user cause the link to be followed sa well. The
number of these has risen dramatically in HTML 4.0. They generally use
the GET method, and are used to reference static objects that have the
GET semantics. These are also used to fetch objects that do not obey
the semantics of the GET method, and adding a METHOD attribute where
appropriate should probably be examined.

	Mike Meyer


1) <URL: http://www.amitrix.com/aweb.html >

Received on Thursday, 25 September 1997 12:42:52 UTC