(Via The Daily WTF:) malboro.com has a bizarre way of selecting who to advertise cigarettes to! Their home page contains the following HTML and JavaScript (below). The headline WTF is that it doesn't work in any browser other than Internet Explorer since the JavaScript redirection relies on using MS's click() method (rather than the rest-of-the-world's onclick) ... but it's also completely inaccessible without JavaScript because it not only relies on IE-specific code to do the redirection but also encodes the redirection URL in the script ... so the link isn't even clickable! Non-IE users are presented with a blank page. The really crazy thing is the <meta> tag, which suggests that the redirecting home page was generated automatically by server-side code using Microsoft .Net! The days when pages were deliberately written to abuse specific browsers (e.g. Opera and the MSN-bork) are not gone they're just refining the technique so that it's exceptional ;-)
<html>
<head>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<title>Coupons and special offers from Marlboro</title>
<meta name="keywords" content="marlboro cigarettes, marlboro miles" />
<meta name="description" content="" />
</head>
<script language=javascript>
<!--
function redirect()
{
var anchorObj = document.getElementById("target1");
anchorObj.href = "http://smokersignup.com/signup/index.jsp?pc=MAR2006";
anchorObj.click();
}
//-->
</script>
<body onload="javascript:redirect();">
<a id="target1" href="#"></a>
</body>
</html>
Perhaps it's deliberate? Only IE-users need cigarette advertising. Are non-IE users considered too intelligent to be fooled by it, or maybe they're all assumed to smoke Marlboro® anyway?!


1 comment:
Wow. That's just horrible. I wonder how they came to the conclusion that this would be a better way to redirect people than an HTTP header?
Actually, the most surprising thing about it is that anchorObj.click() works in Opera. However once I get past the redirect I'm somewhat thwarted by neither being a US resident or a smoker...
Post a Comment