Welcome to WebmasterWorld Guest from

Forum Moderators: goodroi

Message Too Old, No Replies

Comments at the end of a line bad style, why?



6:31 pm on May 12, 2004 (gmt 0)

10+ Year Member

My robots.txt validates, but has "bad style". I thought it is common practice to allow and use comments either on lines by themselves, or after code on a line, in all computer languages. Just looking for reasoning that makes this "bad" style. I could easily move it up to the line preceding, but I'm just curious why it matters. What problems does it cause to do it this way?

Comments were detected after a valid field name. Although ok, this is bad style.

User-agent: * # all robots are to use the same rules at this site!


4:06 am on May 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

The protocol [webdoc.gwdg.de] permits comments, just as you've used them. You're using an overzealous validator. :)


6:52 am on May 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

I remember reading somewhere that some badly written bots stumble on these when they come across them (even though it is perfectly valid to have them like this).

Better to be safe than sorry!


Featured Threads

Hot Threads This Week

Hot Threads This Month