0

IN the spirit of Olympic build-up, I thought I'd cast a professional eye over the official website (http://www.london2012.com). YSlow reported quite a few 'F' grades so I thought I'd check the markup using the W3C Validation service (http://validator.w3.org) ...

It won't work - I get a 403 (Forbidden) back as a result. Can anyone explain why please?

immutabl
  • 6,857
  • 13
  • 45
  • 76
  • 2
    My first guess would be that the site is looking at the requestor's agent string, and that the server has identified the validator as an unwelcome bot. – Bob Kaufman Jul 26 '12 at 14:28
  • 1
    I was able to validate it with Opera (right click -> validate source code, or something like that, as my Opera is in pt-br). 58 errors, 21 warnings. – Ortiga Jul 26 '12 at 14:29
  • Thanks. It suddenly occurred to me that I could just copy & paste the source into the validator. So I did. And got 22 warnings and 58 errors. – immutabl Jul 26 '12 at 14:44

3 Answers3

1

the validator is being blocked on the server-side (possibly by useragent or IP).

this is the HTML of the access denied message the server throws (obtained by attempting to validate the received error document inside the validator tool and ticking the show source option) :

<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
You don't have permission to access "http://www.london2012.com/" on this server.<P>
Reference #18.40140712.1343313311.29cc62c
</BODY>
</HTML>

it is however unclear as to why the server would deny access to the validator.

wehal3001
  • 761
  • 5
  • 12
  • The W3C validation service reports 58 errors. Perhaps someone was trying to keep the glare of publicity/scrutiny off it? – immutabl Jul 26 '12 at 14:46
  • 1
    I doubt it. performing cURL requests with useragent strings set to either `curl`, `wget` or `lynx` yields the same above 403 Forbidden page (`curl -i -A "lynx"`). however, setting the useragent to the one the W3C validator tool uses (`W3C_Validator/1.3`), does _not_. – wehal3001 Jul 26 '12 at 18:46
1

The W3C CSS validator revealed 24 CSS errors and 38,547 warnings and mobile has 26 errors and 0% mobile friendliness in 193 lines of source code

0

If you're using Firefox you can use this trick:

  • Install the Web Developer Toolbar
  • Open the URL
  • In the Web Developer Toolbar use "Tools" -> "Validate Local HTML"

It is basically just sending a copy of the source code to the W3C validation service.

mwld
  • 225
  • 2
  • 8
  • And that's why it too returns a 403. – immutabl Jul 26 '12 at 14:49
  • I guess you did not try it because it works: "Errors found while checking this document as XHTML 1.0 Strict! Result: 59 Errors, 21 warning(s)" It´s not W3C accessing the site but WDT sending the source copy over to the validator. This way it works! It's like copying and pasting the code to the validator source field .. – mwld Jul 26 '12 at 15:09