Just spoken to a friend who is a wizard at scripting he said it looks fine legal coding but is scarey as it misses the else so if it doesnt match any rule it does nothing.
cookie lasts 24days which is long time it checks which internet you are using if you are on Bt then it checks to see if you are bt.com then adds the cookie same for VM if you are on VM then it adds cookie for VM will be same for TalkTalk if we had anyone who could visit it and copy and paste their findings.
When I visit it I get.
Quote:
var localeCookieName = 'loc';
var defaultLocale = 'uk';
var userTypeCookieName = 'userType';
var userTypeCookieDuration = 730; // Days
function webwiseInit() {
checkUserType();
renderLocaleSelect();
}
function checkUserType() {
var userCookie = readCookie(userTypeCookieName);
if (userCookie == null || userCookie == '') {
setUserType();
}
if (getUserType() == 'BT User') {
location.replace('http://bt.webwise.com');
}
}
|
It sees I am on BT but not BT.com so does nothing