The ECB has a website called Play-Cricket that stores results, fixtures and statistics for cricket clubs all over the UK. My club page can be found here.
Unfortunately, in their infinite wisdom, the site developers have included a fancy piece of javascript that directs people to an “upgrade” page if you’re not using a browser they have selected as appropriate. It is possible to get around this, however, by typing in the full address: http://morebath.play-cricket.com/home/home.asp.
I sent them an email in June last year detailing the problem and asking if they could get it fixed. I got a nice reply from their Helpdesk, but so far they haven’t done anything about it. I still get directed to an upgrade page if I navigate anywhere.
It’s 2008. There is almost no reason for doing this. I’m also on a Mac. Why are you telling me to upgrade to Internet Explorer or Netscape?
From: Daniel Marks
Sent: Mon 6/4/2007 10:37 AM
To: Play-Cricket Helpdesk
Subject: Browser supportPlease, please, please fix up (or preferably remove) the Client-side browser Check from the play-cricket website.
It’s 2007, most browsers are compatible, and it’s just a horrible way of limiting your audience to people who are using web browsers that you think will work properly.
My computer time is spent on either a Mac, or some kind of machine running Linux, and I use Opera.
You haven’t considered Opera in your script, so I get sent to a ridiculous ‘upgrade.htm’ page telling me to download the latest version of Internet Explorer or Netscape (Ha! How 1998!). Sites were doing this 10 years ago!
The silly thing is that if I go directly to a page I know about (ie, if I run Safari and then browse to my teams site, copy the address, and then paste it into Opera), it bypasses the script and everything works fine. How about just removing the script? I’m sure you’ll find that zero people (or very close to zero) have a problem viewing the site, especially if it has been designed correctly against suitable web standards (which, incidentally, it hasn’t [1], but things should still work fine).
The relevant script is this one:
// Client-side Browser Check
var agt = navigator.userAgent.toLowerCase();
var version = parseFloat(navigator.appVersion);
var is_ie = ((agt.indexOf("msie") != -1));
var is_ie3 = (is_ie && (version < 4));
var is_ie4 = (is_ie && (version == 4) && (agt.indexOf("msie 5")==-1) );
var is_ie4up = (is_ie && (version >= 4));
var is_ie5 = (is_ie && (version == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5 = (is_ie && (version == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1)
&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_mac = (agt.indexOf("mac")!=-1);
var is_nav6up = (is_nav && (version >= 5));
var is_nav4_5up = (is_nav && (version >= 4.5));var is_ie4up = (is_ie && (version >= 4));
//alert("agent: "+agt+"\nversion: "+version+"\nis_ie: "+is_ie +"\nis_nav: "+is_nav+"\nis_mac: ">+is_mac+"\nis_nav4_5up: "+is_nav4_5up +"\nis_ie4up: "+is_ie4up+"\nis_ie5up: "+is_ie5up);
if ((!is_mac && is_ie4up) || (is_mac && is_ie5up) || (is_nav6up)) {
window.top.location = "/home/home.asp";
} else {
window.top.location = "/upgrade/upgrade.htm";
}You should be loading
/home/home.aspfor everyone!Cheers, Daniel.
That whole thing could just be replaced with window.top.location = "/home/home.asp";
Who knows, maybe one day..


