Harlan Messinger wrote:
Michael Winter wrote:
>>yawnmoth wrote:
>>>Is a standards-compliant browser guaranteed to see empty action
attributes as being self-referential actions?
Guaranteed? I wouldn't like to say. It certainly should though as
that is how empty URI references are defined.
Looking to refute this, I found that you're correct ...
Always nice to know. :-)
Simple evidence can be found in the reference resolution examples (5.4
in RFC 3986, Appendix C in RFC 2396):
Within a representation with a well defined base URI of
http://a/b/c/d;p?q
a relative reference is transformed to its target URI as
follows.
....
"" = "http://a/b/c/d;p?q"
which tells me, unless I'm missing something *now*, that I and others
have been giving incorrect information here.
Really? Obviously I haven't read every post on the subject sent to this
group, but I've never noticed bad advice (and if I had, I'd have
mentioned it). Still, you've drawn attention to something that I've
overlooked in the past.
From RFC 2396 (http://www.ietf.org/rfc/rfc2396.txt):
By the way, 2396 has been obsoleted by 3986 (the latter being a
standard: STD 66).
[snip]
>One thing I'm curious about is why IE resolves such URIs correctly
for action attributes, but not anchor href attributes. Perhaps it
was one of those things that Microsoft intentionally broke.
IE is definitely wrong.
There was no doubt in my mind about that! It resolves such a URI as if
it were ".".
Firefox reloads the current page (including the original query
string!),
The original query string is to be expected as both the path /and/ the
query string identify a particular resource, so a same-document
reference must include both...
which the spec passage above says it shouldn't do.
....but I had overlooked the part about not re-retrieving the current
document. That said, the URI specifications do not seem to reference or
use RFC 2119 (requirements levels), and even if they did, it would be a
SHOULD, not MUST, requirement.
In this instance, I think there is justification for overriding any such
desire to prevent new requests as a user agent cannot know, just from
the URI alone, whether a new request is actually warranted. After all,
using the example from the RFC, even a URI "d;p?q" would be considered a
same-document reference as it resolves to the base URI. To force a
reload using only a link, one would have to add (and constantly alter)
the query string, or use client-side scripting (not that the latter
would be sensible).
If the desire is to eliminate a new request, then HTTP already provides
a feature capable of that very thing: caching.
On form submission ... With GET, the form data replaces, rather than
being appended to, the original query string.
Yes, I've found that to be annoying and, in my opinion, quite stupid.
Why force authors to include hidden form controls to pass on operational
parameters rather than just using the query string?
Mike