[thelist] do not use the javascript: link protocol - why? (was: collapsible elements without using IDs)

Peter-Paul Koch pp.koch at gmail.com
Tue Dec 7 10:09:10 CST 2004

>  > P.S: Never, under _any_ circumstances use javascript: as a link
>  > protocol. It is a bad habit that MUST die.
> I think I know why you are (so adamantly) advocating this, but I'm not
> 100% certain. Can you fill us in, please?

The link is inaccessible without JavaScript, obviously. 
Especially when this construction is used for popups and such, where
there actually is a file to link to, the inaccessibility is completely
avoidable and therefore just bad coding, no excuses accepted.
See Jeff Howden's all-time classic
for the full argument.

Besides, using the javascript: protocol violates the separation of
behaviour and structure. JavaScript doesn't belong in the XHTML file,
it belongs in the JavaScript file. See
for the full argument.

ppk, freelance web developer

NEW: Bug Report system:
Report bugs yourself, or comment on previously 
reported ones.

More information about the thelist mailing list