lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev lynx bug?


From: Klaus Weide
Subject: Re: lynx-dev lynx bug?
Date: Sat, 29 Apr 2000 16:12:34 -0500 (CDT)

On Sat, 29 Apr 1972, Mark Papsun wrote:

> I'm not a developer, but I'm seeing something that makes no sense to me.
> 
> When I go to http://www.scborromeo.org/ccc/p2s1c1a1.htm#brief, I get the
> same page as when I go to http://www.scborromeo.org/ccc/p2s1c1a1.htm. 
> 
> Why does this happen?

You always get the same "page", in the sense of "Web page" as the whole
document, whether there is a #something or not.  The #something -
technically called a "fragment" in the URL-reference - indicates a
location within the "page".  If lynx knows about that location, it will
position the visible part of the "page" such that the fragment location
is at the top.  If lynx does not know that location, it basically acts as
if there was no #fragment given in the URL-reference at all.

In HTML, the fragment has to correspond to the name of a named anchor (or
the ID attribute of some element - but that doesn't apply here).  Now look
at the source of the page, where the "IN BRIEF" section begins.  You'll
find
   <STRONG>
   <A NAME=BRIEF>IN BRIEF</A>
   </STRONG>

This means that the name of the target anchor is "BRIEF", not "brief".
These identifiers are supposed to be used in a case-sensitive manner,
at least as far as matching is concerned.  See
   <URL: http://www.w3.org/TR/html4/struct/links.html#h-12.2.1>,
in particular the following:

     * String matching: Comparisons between [180]fragment identifiers and
       anchor names must be done by exact (case-sensitive) match.

and

    Although the following excerpt is legal HTML, the behavior of the user
    agent is not defined; some user agents may (incorrectly) consider this
    a match and others may not.
  <P><A href="#xxx">...</A>
  ...more document...
  <P><A name="XXX">...</A>

> P.S.  There are scores of similar links at the website, and they work like
> I expect (.htm#brief takes you to the IN BRIEF section). Actually there 3
> other spots nearby this one that do the same thing (take you to the 
> beginning instead of the end: In Brief) 

Not sure whatt you mean - concrete URLs and locations would help
more than "scores of links" and "other spots nearby".

Anyway, you should ask the providers of those pages to correct
the links (or anchor names).  Apparently they rely on the
*incorrect* behavior of "some user agents".

    Klaus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]