2008-12-30 At 22:08:Forever TrafficOkay, here is a dumbass move from a traffic exchange if I ever seen one. I started a surf session here and got a blank page on startup. I took a look at the source of the page and found this:
function resizeOuterTo(w,h) {
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
top.outerWidth=w;
top.outerHeight=h;
}
else top.resizeTo(w,h);
}
}

var loc = "surf.php?sb=&cash=&mid=XXXXX&mname=XXXXXXX";
if (screen.width==800||screen.height==600) { //if 800x600
resizeOuterTo(800,600);
location.replace(loc+"&ri=800");
}
else if (screen.width==640||screen.height==480) {
resizeOuterTo(640,480);
location.replace(loc+"&ri=800");
} else {
resizeOuterTo(1024,768);
location.replace(loc);
}
For those not in the know this is an automatic window resize event code written in javascript. It is ment to be used in the event a member makes the browser window smaller than the screen size.

Here is what makes the use of this code totally stupid:

1) Monitor resolutions go far larger than the larger resolution used in the code (1024X768) The larger resolutions are most comon with programmers like myself and with the newer monitors out on the market today. For instance, the resolution I am using is way larger than the 1024X768 used above. So what this code does is try to resize my window to a smaller size than my screen.

2) The code does not take into account if the user has the taskbar showing or not or if the taskbar is larger than one or two lines. What happens if the user has the Windows Taskbar locked and not on auto hide? The lower part of the surf window does not show and the surf session is useless cause part of the webpage is not viewable.

3) The second thing that makes this code stupid is this is the only thing on the page. I’m not kidding! This Javascript is not even enclosed in proper HTML formatting. The “Webmaster” (sic) thinks that they can just throw a page up with nothing but Javascript on it and away they go! Piss poor programming IMHO.

4) If you are using this traffic exchange and you have not or can not catch this script/error then you are open to Cross Site Scripting. Instead of me going through all the details about XSS I’ve provided a link for you to use for more information. You determin if it is bad or not… This is how people used XSS.

5) The script does as Javascript redirect to the surfbar window after trying to resize the window. The script will then try to push a URL on you after first screwing around with your window sizes.

Come on people! Get your shit together and write clean code. Enclose it in a proper HTML coded page and give the user another chance at clicking forward if your crap Javascript don’t work! I swear to you, we do want to use your traffic exchanges (this goes to all traffic exchanges). But, we won’t if you continue to write crap HTML code in your site and use simpleton javascript code to try and coax us to do something. It has no effect on most computers!

Everybody that reads this should come away with one thing. Vote with your feet! If there is a traffic exchange that can’t clean up their act then don’t use it. I don’t care if the TE is the best in the world (It’s probably hype anyway) don’t use it if the coding is trying to screw up your computer! Period!

This Traffic Exchange is going to the do not use list until this gets taken care of.

Any Comments?

Take Care,
Phil