Kreative Language Mangling – KLM goes large

Haven't checked the most recent weekly, but be glad you don't have to witness the mess that is KLM.com in the newest internal build. The reason? Regressions in recent builds that mean we don't parse things like this as expected:

<div>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>KLM Royal Dutch Airlines</title>
</head>

<body>
<div id="langdata"><ul><li id="aw">Aruba<ul><li class="en">English</li><li class="nl" id="selected">Nederlands</li></ul></li></ul></div></body></html>
</div>

Does that look ugly? This, ladies and gentlemen, is what you get when you do document.createElement('div') and follow up by setting the innerHTML of said div to the responseText of an XMLHttpRequest that just fetched an address that turned out to be a complete HTML document!


KLM is a weird site indeed.. Look closely at the markup. Note how they carefully avoid custom attributes, instead using HTML4's "id" and "class" to carry the information about two-letter country codes and language codes. You would think they actually cared about writing valid HTML…

..an impression that obviously fades when they try to cram the source of an entire document into a poor DIV. Deep inside the JavaScript, the W3C validator won't ever see it – must be OK then, right?

And here is the other fun part: when this breaks, the whole site becomes unusable. Now, of course this is a bug in Opera and we won't ever release it so it isn't much of an issue but the question I'd like to ask them is: since you actually appear to care at least some about correct HTML coding, what part of the progressive enhancement idea did you not understand?

Advertisements

2 thoughts on “Kreative Language Mangling – KLM goes large

  1. Sorry to hear that, but for some reason I'm not surprised. Airline and travel websites in general seem to be a assache to use (and I'd guess to develop, too).I'd guess it's mostly due to the fact they've got massive integration with legacy realtime systems for ticket reservations, etc. but in general it's not an excuse to have messy, confusing sites all together. this report is a bit dated, but still hits the spot.Naturally I've not visited every airline site and actually the situation might have improved… I challenge everyone to show me the best airline website thee can find 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s