Posted by Rob Waaijenberg on 06/27/07 12:46
Toby A Inkster schreef:
> Andy Dingley wrote:
>
>> There's stuff like this:
>>> <script language="JavaScript" type="text/JavaScript">
>>> <!--
>>> function MM_reloadPage(init) { //reloads the window if Nav4 resized
>> Now if I were interviewing for HTML coders, I'd ask them to identify at
>> least 4 or 5 problems with just those few lines of code.
>
> 1. The language attribute is obsolete.
> 2. MIME types are typically written in all lowercase.
> 3. RFC 4329 says that "text/javascript" is an obsolete MIME type, however
> the standards-compliant MIME type for Javascript isn't supported in
> IE and many older browsers.
> 4. Comments around script haven't been necessary for well over a decade.
> 5. Comments around script are actually harmful if interpreted as XHTML.
> 6. This chunk of Javascript has been inserted entirely for the benefit of
> Netscape 4, even though rest of page does not support it. So the script
> as a whole is redundant.
>
Toby, I guess you've got a new job
--
RW
[Back to original message]
|