- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
As a web designer, things like this make me cringe.
Seriously, what possible logic goes into something like this?
Admin
2nd?!
All I gotta say is: Wow.
Admin
Admin
It may be a generated page that automatically redirects to the right place based on server variables....
Although since the link still has "MAR2006" in it, that's questionable.
Admin
Admin
Pure all-around incompetence.
I am pretty sure the guy who coded this already knew that he was improvising while he was writing this.
Thus: I'm going to become rich and famous after I invent a device that allows you to stab non-google-familiarized coders in the face over the internet (TM: bash.org)
Admin
Content? Microsoft Visual Studio .NET 7.1
For... a refresh? GOD NO!
Admin
<quote>now has a teases the user via setTimeout, making the user's anticipation and excitement grow for a full second until they're redirected</quote>
No they are not. It waits a second before displaying the "Your browser does not support javascript" message.
Admin
I want more follow-ups from classic WTFs. Where IS Paula for instance?
Admin
"it's almost accessible to users with JavaScript."
You probably meant "without JavaScript" there?
Ed: Fixed!
Admin
Maybe this will be the first site that Cuil will be able to properly index, it sounds almost as messed up as it.
Admin
TRWTF is Alex visiting Marlboro.com
Admin
Look, some lowly programmer is doing his very best to protect children from smoking ads, without the evil corporate bosses getting wise to his work. Now you've gone and blown his cover. Nice work, jackass.
Anyway, we warned the MSIE users of the dangers of their browser (and Javascript) now it can actually kill them by enticing them to smoke. Is it any wonder Firefox market share is growing?
Admin
Gotta love a website that unintentionally blocks out some of their customers because of their browser. It's almost as if they wanted to promote IE more than their own products. Are they in any way affiliated with Microsoft?
Admin
Post nominated for blue color!
Not really. If they were, they would do the redirect using Silverlight and a proprietary COM component.
Admin
So... what, exactly, does Marlboro put in the cigarettes that they give to their web developers?
Admin
TRWTF's are:
1.) Hosting with ASP.Net, and coding with .jsp (Real Developers will also spot TRWTF is for using .Net or IIS in the first place)
2.) Using JavaScript to redirect
3.) "updating" the website to XHTML only to keep deprecated crap like: language="javascript" in.
4.) Using JavaScript to un-hide the hidden content if the user doesn't have JavaScript enabled... then add insult to injury by not making any physical call to the check() function.
5.) Having a domain "Marlboro.com", then not actually using it for anything but a re-direct.
6.) Not showing the super cool cowboy enjoying a soothing relaxing smoke.
7.) Not following the Daily WTF, and thus realizing your code is posted, and you look like a tool!
Admin
Even when I was smoking Marlboro cigarettes I wouldn't have spent so much energy trying to view their website. It's like creating a user account on a toilet-paper manufacturer's site.
"But if I submit enough Squares, I can redeem them for Quilted Northern branded merchandise!"
Admin
They declare the namespace to be xhtml but the code is not xhtml complaint. The script tags don't have the required "type" attribute, for one. They only have the language attribute.
Admin
WARNING: The Surgeon General has determined that using Microsoft Internet Explorer maybe hazardous to your health.
Admin
What I don't understand is the whole point of the Marlboro website. Or any other tobacco company site. Who the hell has absolutely nowhere else to go and visits this sites?
Admin
Blue color. Now.
Admin
Admin
Or how about response.redirect("http://go/someplace/else")?
I think that's what is implied by the edit at the end of the article. IMHO, the real WTF is that they aren't redirecting with server code.
Admin
ummm...
Response.Redirect( someURL); ?
If you're running .Net, Use it!
Admin
Oh get real, when exactly did it become a crime to not force your customers to use the latest resource hogging browser of your choice?
Admin
Evil begets evil ...
Admin
So, what does the loc function do? It appears to set an unused variable, and call it good.....
Admin
Why use a simple 301 when clunky js will work just as well, except when it doesn't?
Admin
it set's window.location, which will redirect the browser. the default scope is the window object, so you can access its functions and properties without typing window.
Admin
Ahh... lack of JS knowledge fail....
Admin
The one second delay is so you'll have time to light up.
Admin
This is an official Your Brain On Tobacco site.
Admin
TRWTF is that .Net Capitalizes The Methods When They Should Be lowercase. Classes Are Capitalized, methods are not. ;)
Anyway, either the <meta> refresh tag or response.redirect methods are way more effective than any kind of JS redirect. Why use JS at all???
Admin
Technically, the "Refresh" header is non-standard, as is its <meta http-equiv> equivalent. </pedant>
Admin
Well all the hip kids today are using Firefox... ...and we're not allowed to advertise to kids...
Admin
Admin
Why didn't they put the call to check() inside a finally block? They ALWAYS execute.
Admin
This is truly a gem. Clearly Phillip Morris's cousin's brother's son took a class in Bizzaro Web Development. Either that or it was a spy from the Camel Cigarettes people.
CAPTCHA: damnum (damn-um?)
Admin
Maybe it's because I'm not a smoker and I don't get it, but isn't SmokerSignup.com like... the worst name for a website ever?
"Admit that smoking defines your character and affixes you with an unremovable label! Join our website!"
"Does the pitiful dangled-carrot of potential coupons make you want to self identify as a rotting, cancerous mass? Join our website!"
It would be less insulting if they called it SuperHappyFunTimeCigaretteClub.com
Admin
Paula? I prefer Irish Girl.
Admin
Oh don't you start that up again.
Admin
"compromosing"?
Admin
Over here, i.e. in the UK, there is a toilet paper manufacturer that puts tokens on the wrapping of the product but you can only redeem the tokens on its website.
Ps. I haven't been to it but noticed it the other.
Pps. Marvin (Mode:=On)
Just when you thought that life could not get weirder, it does.
Marvin (Mode:=Off)
Admin
Well, just enough time to smoke one before this page loads...
Admin
If you're bored, go let 'em know:
http://www.philipmorrisusa.com/en/cms/contact_us/contact_us.aspx?src=footer_nav
Admin
Which is displayed using... Wait for it....
Javascript.
Admin
I once saw a website generated by MS Word where the pages appeared normal at first, but in which the links on the page (which were "button"-type images of some kind) weren't working for some users.
When I looked a little closer, I discovered that each image had its own client-side image map attached to it to determine where the user had clicked (even though they were individual buttons). The image map called JavaScript functions which performed a redirect just like the code from the Marlboro site.
If I remember correctly, the URL to redirect to was passed from the image map. So the link in the image map would have been something like "javascript:DoRedirect("http://someserver/somepage.asp");".
At least it wasn't a server-side image map, I guess.
Admin
Response.Redirect sends a 302 response to the browser (Temp Redirect) Google and other search engines will pick up on this and not index the page that you redirect to. This needs to be a 301 Redirect, which Im not sure you can do in .net without fiddling)
Although I seriously doubt that they follow the JS redirect either...
At least at the moment they will locate and follow the link on the page, unless of course google picks up on the fact that the link is in a display:none block and ignores it?
Admin
Sorry.