Bad Request on London Elects Website

It’s election time to find a new mayor for London soon, and what better way to get people to vote than by providing all the information about if you are eligible, how to register, or where you can vote by commissioning a nice shiny website that is available in nearly every language imaginable?

The answers is there isn’t :o)

Now imagine that you have a tv campaign to promote the existence of this website running across various local channels in London, you would have thought that some one, somewhere would notice that if you do not include the www. in http://www.londonelects.co.uk then you get a 400 – Bad Request http header.

If you are like me then you would probably cursor focus your address bar, then hit cmd + A to select the current url and just type in londonelects.co.uk, the browser would then add the http:// and send you onto http://londonelects.co.uk

As i already stated when you get there you will get a Bad Request error which seems pretty silly to me since i can imagine that a hell of a lot of people wont be typing the www. when typing in the domain.

Shouldn’t it be obvious to websites that are trying to promote themselves, to at least check if the non www version actually resolves to the website? Well you would of thought so.

It amazes me that these official websites can’t even get the basics down, so what should they do to fix it?

RewriteCond %{HTTP_HOST} !^www.londonelects.co.uk$ 
RewriteRule ^(.*)   http://www.londonelects.co.uk/$1  [QSA,L,R=301]

That simple piece of code can be placed in a .htaccess file and will redirect anyone who types the url without www to the url that includes the www, easy peasy :o)

Microsoft to web developer world – “We finally listened”

ie7logo.jpgOn what marks a surely glorious day in the web developer world, Microsoft have done a complete U-Turn  on their decision to force developers to use tags which make IE8 render in standards mode. Apparently the browser will now render in standards mode via default.

Dean Hachamovitch, General Manager of Internet Explorer stated…

“We’ve decided that IE8 will, by default, interpret web content in the most standards compliant way it can. This decision is a change from what we’ve posted previously. Microsoft recently published a set of Interoperability Principles. Thinking about IE8’s behaviour with these principles in mind, interpreting web content in the most standards compliant way possible is a better thing to do.”

So from this we can see that Microsoft are actually starting to take standards seriously which is good news for everyone since IE has been a pain to develop for.

You can find out more on the official Microsoft blog

Microsoft releases Internet Explorer 8 Beta

I am rather suprised at how quickly MS have managed to get IE8 beta out the door, but i received news today that it is available to download now. I am currently on my MacBook so can’t test the beta just yet, but intend to get home this evening and give it a whirl.

You may or may not know this but to get IE8 to actually render pages correctly developers will have to do a whole hosts of user-agent sniffing or style sheet selectors, you can find example code of this below…

function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser)
{
var rv = -1; // Return value assumes failure
if (navigator.appName == 'Microsoft Internet Explorer')
{
var ua = navigator.userAgent;
var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null)
rv = parseFloat( RegExp.$1 );
}
return rv;
}

function checkVersion()
{
var msg = "You're not using Internet Explorer.";
var ver = getInternetExplorerVersion();
if ( ver > -1 )
{
if ( ver >= 7.0 )
msg = "You're using Internet Explorer 7 or Internet Explorer 8.
I should send a quirks or strict mode document."
else
msg = "You should upgrade your copy of Internet Explorer.";
}
alert( msg );
}

It seems to me that every time MS do something good they end up shooting themselves in the foot by insisting that every page on the net needs to be supported to IE6 standards. I see it like this, make users upgrade so us developers don’t have to code for ie6, 7, 8 and then proper standards compliant browsers such as Firefox, Opera and Safari.

IE8 Beta

You can get the beta from http://www.microsoft.com/windows/products/winfamily/ie/ie8/readiness/Install.htm

Google wants you to share your Analytics data

So I logged into Google Analytics this morning to check on some of my sites and i was greeted by a little message asking me if i wanted to share my Analytics data between Adsense, Ad Words and Analytics. I thought great, this will allow me to gain much more information when doing other campaigns.

Google Analytics data sharing

The next tick box down asked if i would allow Google to use my analytics data for anonymous bench marking. I’m a bit weary when a big company like Google asks for users data, but would very much like to see what information (if any) they make available to Joe Public. Will this mean that we can start getting a lot more information about certain verticals when researching Adwords? Or will Google make the information available in Google Trends.

I also wonder how many webmasters are weary about allowing Google to view their site data, and if Google will do the old switcheroo at a later time and start to use Analytics data to factor in SERPS results. I know they do don’t this at the moment as i specifically remember Matt Cutts stating that the spam team does not have any access to the Analytics data.

Anyway, something’s to think about before you click yes, or no.