Forum Moderators: skibum
What possible good reason is there for using code which predates 1999?
I see <script language="Javascript"> everywhere.
Is it necessary?
Is it so much more difficult to write:
<script type="text/javascript">
I also see width="728" height="90" everywhere...
Is it so much more difficult to write:
style="width:728px; height:90px;"?
Would the browsers hiccup either way?
No.
So why write new, updated code the same way it was written in the late nineties?
Okay, granted, the way width and height are marked up doesn't really matter much either way, but escaping ampersands does and describing code types does...
Is there a benefit of writing non-standards compliant code - apart from "I can't be bothered to learn how to do things an easier, less spaghetti way"?
I get the feeling that this is the reflection of some kind of programmer snobbery about html... "it's mickey mouse code anyway, so why waste time learning it properly?"
Non-valid html code still works in some modern browsers because bad coding habits became widespread before standards were ever formalised - so the browsers have to be backward-compatible otherwise (they fear) they look defective.
That's not an excuse for advertising networks which started up in 2004 to use language="Javascript" in their code instead of type="text/javascript"... I don't know a single browser which would break on encountering type="text/javascript"... so why use the language attribute?
If you look at a newer technology such as rss, if you write non-valid code, it doesn't work. Fortunately for tag-soupers, html standards are just recommendations, not requirements.
The advantage of standards based code in general is that browsers and platforms don't have to work harder to cover try to understand tag-soup. And coders don't have to work harder to make sure their code is cross-browser compliant.
I am frustrated that the advantages of clean, standardised code are so little understood. XHTML 1.0 is HTML 4.01 reformulated in xml. It is logically consistent and straightforward to write and reproduce. It has also been around for nearly five years.
Third-party code providers should be leading the way not hanging at the back of the crowd of tag-soupers.
The advantage of standards based code in general is that browsers and platforms don't have to work harder to cover try to understand tag-soup. And coders don't have to work harder to make sure their code is cross-browser compliant.
That sounds like the crux of the issue there.
There is no *real* benefit for making "standard compliant" code.
Old code works just fine. That javascript language works just fine, all browsers understand it.
Browsers don't really have to "work" hard to figure it out.
<script language="Javascript">
A network that started in 2004 that uses this has two bits of javascript in the adcode: one is like this, one is correct. So they sort of half-know what they're doing...
The same network doesn't even html-comment the content inside the script tags (so the coding is visible in screen readers etc). Just carelessness.
I mentioned both problems to them the first days I ran the ads, they said they'd look into correcting them for a future upgrade (maybe). But in the meantime, no, I'm not allowed to fix them myself.
So the end result is their network is just running in test mode on one of my minor sites until I can use valid and correct (hidden) code, rather than more widely.
Sloppy coding comes from sloppy companies. I can understand it might initially be wrong, like it was very early on for Adsense, but there's no excuse not to fix it within say the first six months.
The same company has an ad control panel that doesn't work fully in Firefox. Now that is a case where lack of standards will lose them business quite soon.
Browsers don't really have to "work" hard to figure it out.
No, because the people who program browsers make them bend over backwards to understand all sort of erratic formulations of idiosyncratic, proprietary code from 1996 onwards.
That's a waste of their time and if, like me, you want to write faster, more powerful websites now, rather than in 2020, it's a waste of your time, too.
There is no *real* benefit for making "standard compliant" code.
err... well I have to refer to robho's comment:
lack of standards will lose them business
I rest my case, m'lud.