Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

If it was agreed from day one that Web browsers weren't going to put up with sloppy HTML, then we wouldn't have the mess we have today.

And we might not have the popularity of the web we have today. Graceful failure is a good idea. Under your scheme all of the poor surfers of the world would be getting lots of errors from their browsers when those surfers have no control (and virtually no influence) over getting those errors fixed and many of them would have no idea what those errors mean.

The fact is that many decided to take advantage of one half of a sound principle by completely ignoring the other half of the principle. And only having one half of that principle is certainly not a good idea.

But putting the error checking and enforcement into a web browser client is a really bad idea. Error checking and enforcement needs to be as early in the process as possible. A much better idea would be to fix web servers so that they refuse to emit bad HTML rather than "fix" web browsers so that they refuse to display bad HTML!

It is a good idea to be at least somewhat lenient in what you accept. It is also a good idea to note cases where you were lenient in such a way that this information is likely to make its way back to the source. That back channel is often quite difficult to implement well. But a really horrible idea for such an implementation would be browsers giving errors to web surfers.

Now, being vague about what you accept is a bad idea. That is why the two halves need to go together. In order to be strict about what you provide, you have to define things clearly. Without that side of the coin, just being liberal about what you accept is trying to DWIM, which is (often) a nice feature of Perl but is usually a bad idea in any software that isn't interacting directly with a human.

And do you want to be responsible for explaining to the client that the $30,000 transaction couldn't go through because something changed how much whitespace is sent?

You can go too far in either direction. The idea of the principle is to prevent you from going too far in one direction. You are (in part) complaining about people going too far in the other.

But the complaint about browsers being too lenient is a bad form of wishful thinking. No one will ever produce a browser that is not lenient in what it accepts -- well, if they do, it won't get used much. Now a browser that tells you that it had to be lenient has its advantages, all of which are of no use (and some distraction) to the average web surfer and so will never become widely popular. And having some magical control to force all browsers to not be lenient or to at least complain loudly when they are force to be is, in fact, a very bad idea, unless you also design a way for those browsers to direct their loud complaints back at the authors of the bad HTML.

Go design that back channel first and then you can think about tilting against the "bad, lenient browser" windmill again.

        - tye (but my friends call me "Tye")

In reply to (tye)Re: Larry vs. Joel vs. Ovid by tye
in thread Larry vs. Joel vs. Ovid by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 12:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found