Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    New Coder
    Join Date
    Apr 2011
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to escape w3c validation?

    I hope this is the right forum to ask the question, and in any case apologies for the not so "serious" nature of the question!

    If you try to validate www.artlebedev.com in the online w3c validator, the validator will show an error <N.B.>Browser is the only validator</N.B.>. I thought it was quite funny and even arguably makes a point, my question though how do they achieve this?

    I suspect that they somehow serve a different html page to the validator, which suggests that it is done on the server side, but how would you go about doing this?

    Many thanks and sorry again if it is a silly or a beginner question!

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by monkey186 View Post
    I hope this is the right forum to ask the question, and in any case apologies for the not so "serious" nature of the question!

    If you try to validate www.artlebedev.com in the online w3c validator, the validator will show an error <N.B.>Browser is the only validator</N.B.>. I thought it was quite funny and even arguably makes a point, my question though how do they achieve this?

    I suspect that they somehow serve a different html page to the validator, which suggests that it is done on the server side, but how would you go about doing this?

    Many thanks and sorry again if it is a silly or a beginner question!
    the page start with:
    Code:
    <!-- meta name="GENERATOR" content="Microsoft FrontPage 1.0" -->
    since is not a valid doctype, ..., but you can read this in the validator message,

    best regards

  • #3
    New Coder
    Join Date
    Apr 2011
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That's right it appears the reference to MS FrontPage is their other joke


    But somehow it seems to me that the validator never gets to read the actual page of the website. It seems that the server is set up to serve to the validator a different page, with the only content

    Code:
    N.B.>Browser is the only validator</N.B.>
    hence we can see that the error is found at "Line 1, Column 1". The angle bracket of the "tag" N.B is omitted intentionally, to make the validator find this error and display the "message"


    But how is it done on the server side? How to make the server serve a set page to the validator, no matter what page of the website it attempts to validate?

  • #4
    New Coder
    Join Date
    Apr 2011
    Posts
    36
    Thanks
    0
    Thanked 3 Times in 3 Posts
    I would guess that it was done with a server side include. Something like below [I]should[I] work but I haven't tested it.

    Code:
    <!--#if expr="${HTTP_USER_AGENT} = W3C_Validator/1.2" -->
    <p>print a nasty message</p>
    <!--#else -->
    <meta name="description" content="I don't know where to put my meta tags when I'm using frontpage" />
    <html>
    ...

  • #5
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Yeah basically they serve a different page based on either the user agent or the IP requesting the page.

    Why would you intentionally want to break the validator though? Why waste the effort?
    OracleGuy

  • #6
    New Coder
    Join Date
    Apr 2011
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the pointers guys, I will research it more and try it out, for educational purposes


    Quote Originally Posted by oracleguy View Post
    Why would you intentionally want to break the validator though? Why waste the effort?
    I think just as a little joke, which from the point of view of someone who is a web designer, has a grain of truth. Website validation and what w3c does is very valuable of course, but the current situation is that not all browsers adhere to the standard. Its probably not a problem for a simple code, but a professional complex website if designed so that it validates, will most certainly break in some of these not so strict browsers. Hence I think is their message for those most curious, that "browser is the only validator".

  • #7
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by monkey186 View Post
    Hence I think is their message for those most curious, that "browser is the only validator".
    i think is only the arrogance of somebody to lazy or unable to deal with techincal stuff. Browsers are a mess and w3c drafts are no designed only for them.

    best regards

  • #8
    New Coder
    Join Date
    Apr 2011
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by oesxyl View Post
    i think is only the arrogance of somebody to lazy or unable to deal with techincal stuff. Browsers are a mess and w3c drafts are no designed only for them.

    best regards

    I'm not sure but it seems you contradict yourself - in that you're admitting that browsers are a mess, but at the same time suggest that inability to deal with this mess is laziness?

    As I see it, the task of a web designer is to present information to people. Their goal is to present it in a best possible way, taking into account among other things accessibility, usability, visual artistic presentation, functionality, and simplicity. But the most important of them is they have to *present* this information to people, which means they have to take into account a variety of media which people use to access the website, and make sure that their information is correctly displayed by such media.

    Now if the media are a mess, as you say, and i agree often it is the case - this means that by following a code which such messy media do not follow, the information which designer has to present is not going to be presented. How is it lazy in this situation not to follow the code?

  • #9
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by monkey186 View Post
    I'm not sure but it seems you contradict yourself - in that you're admitting that browsers are a mess, but at the same time suggest that inability to deal with this mess is laziness?
    where do you see contradiction? what means from your point of view "browser is the only validator" else then a excuse?

    As I see it, the task of a web designer is to present information to people. Their goal is to present it in a best possible way, taking into account among other things accessibility, usability, visual artistic presentation, functionality, and simplicity. But the most important of them is they have to *present* this information to people, which means they have to take into account a variety of media which people use to access the website, and make sure that their information is correctly displayed by such media.

    Now if the media are a mess, as you say, and i agree often it is the case - this means that by following a code which such messy media do not follow, the information which designer has to present is not going to be presented. How is it lazy in this situation not to follow the code?
    why do you think that some people want to make things to work and they make it to work since others doesn't care and pretend that "browser is the only validator"?
    there are only two explanation, they are unable to do it or are lazy, can you give me another rational reason?

    best regards

  • #10
    New Coder
    Join Date
    Apr 2011
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by oesxyl View Post
    where do you see contradiction? what means from your point of view "browser is the only validator" else then a excuse?

    why do you think that some people want to make things to work and they make it to work since others doesn't care and pretend that "browser is the only validator"?
    there are only two explanation, they are unable to do it or are lazy, can you give me another rational reason?

    best regards
    Well, as a matter of analytical necessity, if a browser does not follow the code, a website which follows the code will not be displayed in this browser as it should be displayed according to the code?



    "Browser is the only validator" means that if the goal of a web designer is to deliver the information to people, because the information is delivered via the browser, the last word will always be after the browser.

    In other words: I design my website according to all correct standards, and to the best possible way from the point of view of the web design itself. I run this website through the validator and it validates. That is fine. But at this stage I haven't yet achieved my task. My task is to ensure my website can be delivered. The responsibility for the delivery rests with various browsers which people use to view my website. Therefore what I now have to do, is to ensure that each of these browsers delivers my website correctly. If some of these browsers do not follow all correct standards, they may display my website (which does follow all correct standards) incorrectly. In order to fix this, I amend the coding of my website so that it displays in the "incorrect browsers" as well. After this stage, if I run my website through the validator, it will not validate. This is logic. I cannot eat the cake and have it at the same time. I need to choose one: either my website validates, or my website is delivered by all browsers, including the "incorrect" ones. Because I am a web designer, where my priority is to deliver my website to people, I choose the latter.

  • #11
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by monkey186 View Post
    Well, as a matter of analytical necessity, if a browser does not follow the code, a website which follows the code will not be displayed in this browser as it should be displayed according to the code?
    that means to be able to do a good work, valid and ok displayed in browsers.

    "Browser is the only validator" means that if the goal of a web designer is to deliver the information to people, because the information is delivered via the browser, the last word will always be after the browser.

    In other words: I design my website according to all correct standards, and to the best possible way from the point of view of the web design itself. I run this website through the validator and it validates. That is fine. But at this stage I haven't yet achieved my task. My task is to ensure my website can be delivered. The responsibility for the delivery rests with various browsers which people use to view my website. Therefore what I now have to do, is to ensure that each of these browsers delivers my website correctly. If some of these browsers do not follow all correct standards, they may display my website (which does follow all correct standards) incorrectly. In order to fix this, I amend the coding of my website so that it displays in the "incorrect browsers" as well. After this stage, if I run my website through the validator, it will not validate. This is logic. I cannot eat the cake and have it at the same time. I need to choose one: either my website validates, or my website is delivered by all browsers, including the "incorrect" ones.
    i'm curios to see this, i don't pretend that everything can be solved or that i can solve it, i'm just curios,

    Because I am a web designer, where my priority is to deliver my website to people, I choose the latter.
    about the 'deliver' part we are talking. Are many way to deliver, we need to speak same language for this and this is why drafts and standardization process exists.
    One more thing, i have my own laziness or unability to do different thing, like anybody else, i don't judge anybody and like everybody else i have two choices, to hide this behind some 'motivation' or to admit that this is a fact. The true is that we can do better, that's all,

    best regards

  • #12
    New Coder
    Join Date
    Apr 2011
    Posts
    36
    Thanks
    0
    Thanked 3 Times in 3 Posts
    If for no other reason than the lack of a DOCTYPE Declaration the page doesn't validate to any HTML Standard. However due to the nature of html being a very loosely typed language it doesn't necessarily have to abide by any standard in order to achieve the desired result.

    It's very possible this person came up with something that worked yet didn't validate so rather than reworking the entire site to fix the problem he put in an SSI as a way of sweeping it under the rug.

  • #13
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Solution

    Hey,

    there is actually a blog post about that thing with ArtLebedev.com and W3C validation:

    http://blog.wiens-it.com/?p=55

    Well, it's in german, but it works, i've tryed that by myself.

    All what they do is to read out the visiters IP address and compare that with the IP mask of W3C Validator service (is also shown in the post). And after that they create the html file.

    Just look at this post - at the bottom they have ready code (you have to click on "Quelltext") to show it.

    cheers
    CD


  •  

    Posting Permissions

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