SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs down w3c says broken links - but they're not!

    I don't understand what W3C is doing! It tells me that 5 links are broken on my site (http://validator.w3.org/checklink?ur...h=&check=Check) but they all appear in my browser so - what gives?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,205
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by jimrich View Post
    I don't understand what W3C is doing! It tells me that 5 links are broken on my site ... but they all appear in my browser so - what gives?
    The validator is not necessarily about things not appearing in the browser. It warns you when your code is out of date, obsolete, or malformed in such a way that browsers might have rendering issues ... though browsers can be pretty kind.

    Your link didn't work for me, but if I gather from the link which page you are validating, and it has a lot of outdated code on it. So it would be worth tracking through each of those validation issues.

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,187
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    It looks to be a case issue. eg.
    Validator is trying:
    high.htm
    time-out.htm
    boogie-woogie.htm
    Patches.htm
    the-beat.htm

    Index shows
    HIGH.htm
    TIME-OUT.htm
    BOOGIE-WOOGIE.htm
    PATCHES.htm
    THE-BEAT.htm

    It might help if you picked a more consistent naming format.

  4. #4
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,276
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    "First make it work. Then make it better."

  5. #5
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jeff Mott View Post
    Why does upper case vs. lower case matter? I can see no difference in validators or other examinations of my pages.

  6. #6
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,187
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Why does it matter? Sometimes "a" might be seen as being the same as "A" but not always.
    can see no difference in validators or other examinations of my pages.
    Not sure what you mean.
    error Line: 121 http://www.rainbowsedgefineart.com/JAZZ/Piano-Lessons.htm
    Status: 404 Not Found

    The link is broken. Double-check that you have not made any typo, or mistake in copy-pasting. If the link points to a resource that no longer exists, you may want to remove or fix the link.
    HTML Code:
    <td height="177"><!--mstheme--><font face="Verdana, Arial, Helvetica">
      <p align="center"><font face="Arial"><a href="PIANO-LESSONS.htm"><img border="0" src="PIANO-LESSONS_small.jpg" alt="links to PIANO LESSONS page" width="76" height="100"></a>
    <a href="../JAZZ/Piano-Lessons.htm"><br>
      </a></font><b><font size="1" face="Arial">PIANO LESSONS</font></b></p>
    <!--mstheme--></font></td>

  7. #7
    SitePoint Evangelist silver trophybronze trophy
    Join Date
    Jul 2013
    Posts
    406
    Mentioned
    22 Post(s)
    Tagged
    0 Thread(s)
    If the html-code is for instance...:
    HTML Code:
    ...
    <p>Go to <a href="jazz.htm">jazz!</a></p>
    ...
    ... then it is valid html, and the html-validator will not complain,
    ... for the html-validator is only checking the html-code, and not the existence of domains/directories/files.

    =======
    But if the real file name is JAzz.htm, and you click the link locally in your browser ...
    ... then everything seems OK if you are working on a Windows operating system.

    While if the real file name is JAzz.htm, you uploaded this file to the server of your host, and you view linking page from Internet in your browser ...
    ... then you'll get a 404-message: "Page not found" if you click the same link,
    ... and a link-checker will complain about a missing link!

    =======
    Why does upper case vs. lower case matter?
    Because a server makes difference between upper/lower case, and Windows doesn't.
    • On the server you can have jazz.htm and JAzz.htm in the same directory: they are different files..
    • In Windows, you can have only one of them in the same directory.
    • If in Windows you have a directory with the jazz.htm file and another directory with the JAzz.htm file, and you are copy/pasting the JAzz.htm file to the directory of the other one, Windows will say:
      "In this directory is already a file with the same name.
      Do you want to replace the existing file by your file?
      Yes / No"

    One of the strange things of Windows!

    So the best is to code your directory names and filenames always in the same way.
    • Tip: Always use lowercase for everything, that's easy to remember and will avoid errors and problems.

    =======
    One of the things FrontPage has done: there are several double links, like:
    HTML Code:
    <p align="center"><font face="Arial">
        <a href="PIANO-LESSONS.htm"><img border="0" src="PIANO-LESSONS_small.jpg" alt="links to PIANO LESSONS page" width="76" height="100"></a>
        <a href="../JAZZ/Piano-Lessons.htm"><br>
        </a></font><b><font size="1" face="Arial">PIANO LESSONS</font></b>
    </p>
    Both links are valid as html-code.
    But only the first one PIANO-LESSONS.htm (the link on the image) is the right file name on the server.
    The second link with Piano-Lessons.htm in Camel-case is wrong: that file doesn't exist.
    Apart from that: the second link has only line break <br> inside the <a> and the </a>: no text to click on; it's an empty link!
    I guess the intention was to have the caption text also clickable:
    HTML Code:
    <p align="center"><font face="Arial">
        <a href="PIANO-LESSONS.htm"><img border="0" src="PIANO-LESSONS_small.jpg" alt="links to PIANO LESSONS page" width="76" height="100"><br>
        <b><font size="1" face="Arial">PIANO LESSONS</font></b></a>
    </p>
    Then I don't say anything about the FrontPage production of deprecated code (as align="center", <font ...>, etc).

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,832
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by jimrich View Post
    Why does upper case vs. lower case matter? I can see no difference in validators or other examinations of my pages.
    Apart from the domain name itself the rest of the address of each page is CASE sensitive on most web servers (all web servers running on Linux - as most web hosting runs). Even if it works on your current server, it will almost certainly not work the next time you need to move your site.

    You can even upload the following as separate pages on most web sites:

    HIGH.HTM
    high.htm
    HIGH.htm
    High.htm
    HiGh.htm

    and so on - all as completely DIFFERENT web pages.

    Only some servers running on Windows are not case sensitive. Differences in capitalisation are the commonest cause of NOT FOUND errors when you upload a site from your computer to the web as sites running locally on Windows are one of the few places where all the above filenames refer to one file rather than five different files.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •