Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: open
Correct URL's :
BUT both EI and Mozilla show that:
Wrong URL :
It looks like that fragment identifier should be in the end of URL. I Looked through RFC's, but it looks like they treat (3) as a well-formed URL and give no hint why (2) is correct. May be there is a new one that explains such kind of behavior.
An interesting question.
To me (3) looks incorrect as you are pointing at a URL that is accepting some variables, and also asking the browser to go straight to the named anchor on that page.
However, they may be treating the # as part of the url querystring variable, rather than a named anchor, although the browser may be clever enough to split the named anchor from the URL encoded querystring.
(1) is perfectly formed and (2) looks like the browser will either treat the #ddd as part of the querystring or as a named anchor.
Anyone able to shed more authoratitive light on this?
"The term "URI-reference" is used here to denote the common usage of a
resource identifier. A URI reference may be absolute or relative,
and may have additional information attached in the form of a
fragment identifier. However, "the URI" that results from such a
reference includes only the absolute URI after the fragment
identifier (if any) is removed and after any relative URI is resolved
to its absolute form."
In other words, according to the RCF the URL is split by the fragment identifier first (#), if present, and *then* parsed as an address. It's therefore imperative that the fragment identifier is placed last in the URL, which may also be combined with a query string as in:
Above example works in NN and IE and complies with the RFC as a valid URL.
[example.com...] does also work but has no bearing on the issue at hand, the last "&" is treated merely as an incomplete query string and discarded once the fragment identifier is separated from the URL during initial parsing of the URL.
site.com/folder/#foo mentioned by Birdman above should be correct according to the RFC...