|
|
|
| Non-WTF Job: Web Developer at ZoomInfo (Waltham, Massachusetts) |
| « Connect Over What!? | Please Think Twice » |
Back in August of 2006, I published Redirection with Smoke And ... Smoking. Among other things, the article described what the experience was like for visitors to Marlboro.com:
If you were using something other than Internet Explorer, you likely experienced a familiar sight: a blank page as a result of the site being coded for IE only. In and of it self, that's not too big of a deal, even for #20 on the Fortune 500 List, Altria.
The fun part, however, was why Marlboro.com only worked in IE. To redirect visitors to actual content, they programmatically set the HREF property of a hyperlink on the page and then executed the (IE-Only) click() method on that hyperlink. That meant a noticible redirect for Internet Explorer and a dead page for everyone else.
Here's what the code looked like back in 2006:
<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>
And here's what the page looks like today:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <head> <title>Coupons and special offers from Marlboro.</title> <script language="javascript"> function redirect() { var name = navigator.appName; if(name == "Microsoft Internet Explorer") { try {document.getElementById("link").click();}catch(ex){loc();} } else { loc(); } setTimeout("check()",1000); } function loc() { location = "http://www.smokersignup.com/signup/index.jsp?pc=MAR2006"; } function check() { document.getElementById("the_div").style.display = "block"; } </script> </head> <body onload="redirect()"> <div id="the_div" style="display:none;"> Redirecting... <br /> <br /> If your browser does not redirect you momentarily, please click <a id="link" href="http://www.smokersignup.com/signup/index.jsp?pc=MAR2006">here</a> </div> </body> </html>
Without compromosing their original vision — the pioneering idea of redirection via simulated mouse click — they've added some features:
No longer supported:
We'll keep you updated as new features and enhancements are added.
UPDATE: I forgot to mention, Marlboro.com is running ASP.NET on IIS, as evidenced by these two different 404 errors.
Re: Follow-up: Redirection with Smoke And ... Smoking
2008-08-01 09:36
•
by
Math Penguin
(unregistered)
|
|
As a web designer, things like this make me cringe.
Seriously, what possible logic goes into something like this? |
Re: Follow-up: Redirection with Smoke And ... Smoking
2008-08-01 10:21
•
by
PSWorx
|
Post nominated for blue color!
Not really. If they were, they would do the redirect using Silverlight and a proprietary COM component. |
| « Connect Over What!? | Please Think Twice » |