Losing a customer with javascript

Javascript can do a lot of good on pages, it can also do some bad. Google.com has recently lost a lot of my custom simply because it’s done a few simple things with script which has left me annoyed when using it. It shows how easily you can break user models by adding script to existing pages.

The first problem is specific to IE, Google sniff user agents and serve up different pages, they have some code like this:

<span id=hp style=\"behavior:url(#default#homepage)\"></span>if (!hp.isHomePage('http://www.google.com/')) { ... }

The problem here is that I have my IE with behavior’s disabled as there’s nothing useful that the built in behaviors do, and the user ones tend to leak so much memory and bandwidth due to the various bugs in them and are only really used to add semi-transparent PNG’s on the web - another thing I would really love to do without! However in this state the above code just throws a javascript error, since without the behavior the hp object doesn’t have an isHomePage method. Google scripters should have predicted this, and a well designed test script on a site serving hundreds of millions of people should have picked it up too. A more normal site may not be worth testing all possible IE configurations, but would you want to lose a customer in that state? Defensive coding would not have annoyed me here.

The next big problem is the onload focus the first text box, these breaks my use model in a couple of ways. The first is the previously mentioned onload is too late. What I’ve always done with google is typed into the box, then tabbed to the search box and pressed space, with the onload focus change, now 1 time in 30 or so the space instead of activating the button puts a space in the search box, completely useless, and I’m an annoyed user again.

Google’s an important site for me, it works well as a search engine, and blocking scripts on google whilst successful here, would mean I couldn’t log into GMail, which I do use (mainly because the W3C lists unsubscribe me if I bounce the spam that find its way onto their mailing lists, so I use it for lists.) Fortunately there is a work-a-round, I can use www.google.co.uk with scripts blocked and the toolbar configured to use it. This means google don’t get to track what link I click on with their image check onmousedown, but maybe that’s a good thing considering how much tracking they do of everyones activity.

However as they’ve kept making the site more and more unusable as time’s gone by, I’m going to try and wean myself onto another search engine. I managed to make the google toolbar talk to the MSN search engine - the toolbar search term click to find in the page is a feature I use all the time.

Add an ApplianceButtonSite value to HKCUSoftware\Google\NavClient\1.1\Options with a value of search.msn.com/results.aspx?, and then you can add a new button to the toolbar to search MSN instead. Hopefully that will be enough to start moving me to a new search engine, rather than one which keeps making its UI worse.


  1. Simon Willison Says:

    Is there any reason you’ve gone for MSN over Yahoo!? I’ve always found the ads on MSN offputting - not to mention that I don’t really trust their search technology.

  2. Jim Ley Says:

    Yep, Yahoo fails simply on the “we’re too stupid to set a background colour” test, which is an even more basic QA failure than script I’m afraid, so it’s not even worth considering. The ads on MSN? well #ads_topC {display:none; } in the user stylesheet kills off the ones at the top, but I don’t really find them annoying, or much different to Yahoo’s.