« The Fog of War | Main | In this World »

January 27, 2004

God save the Sniffer

http://www.webreference.com/tools/browser/javascript.html. Did they have Javascript Sniffers around in God's day? This little beauty just saved me again. Here's a classic example of why the Web is doomed. I'm typing away when I decide to go to my own website, last modified a year or so ago, and all of a sudden I'm getting broken links. Yup, something's changed in the system and it wasn't me. Sure enough, it turns out to be not one bug but two.

1) Apple's new Safari browser has a Flash plug-in which interprets relative links differently to the rest. On every other browser, relative links embedded within a Flash movie are taken as relative to the web page where the flash movie run from. Now Safari's Flash player (admittedly still in beta) takes the link relevent to the path of the flash movie component itself.

It's not that the code was great or anything but this is something that was last thought about years ago. You'd think that would be the end of it. Well, it would have been the end of it if the master FLA file wasn't still handy to the guy who wrote this back then. If he hadn't been that would have been a pain to have to re-write a graphical nav bar. I probably never would have bothered.

2) The bloddy sniffer code. So not only are links going off in different directions depending on what computer you look at my page with but now I'm getting this really annoying behavior on my corporate site (yup this is sooo corporate). What it's doing is going to a page and then re-directing to a basic site map page. There's an error there which says that your browser is not standards-compliant which is not only untrue but embarassing because what it's really saying is that Michela can't keep up.

So anyway, instead of going for a walk, having a drink or doing something else normal, I'm looking at the dogs breakfast javascript code which stands for my "standard header code" on the site. This site heralds from the dim dark days of 2001 when everyone was too busy trying to make money to learn how to write web pages. The folks who I commissioned to re-fresh my web site went under during the process. Not directly due to me but I hope I was a contributing factor. I asked for it to be standards-compliant as much as was reasonably possible. It only worked on one version of one browser - Internet Explorer.

Anyway, it got build eventually but the use of IPATH meant that there is a fork in the page code so that if a non-compliant browser hits the site, then presto, you get the site map. The only thing is, and if you're still reading this then I feel sorry for you, that time moves on. Browsers update and now before I know it there's a whole new world of other browser names out there that I've heard of, perhaps even used, but only just today do I realise that all my pages still have this bloody little line of logic which says that if you're not coming in via a Microsoft or Netscape product then you're not going to the graphical site.

Not exactly earth shattering but annoying. The kind of little detail that keeps web people from going offline and leading normal lives because there's systems of hypertext to tend. Seasonal code re-writes and winter filing. Thank Christ for the sniffer though. Without all that high tech browserspotting available for free download, maintained by selfless people down there in the system somewhere, I may have had to get in there and get dirty myself. Gah!

So at some point soon my site will be tediously amended to recognise the existence of new web browsers and it will suddenly become a whole lot less annoying to some people.

Posted by .M. at January 27, 2004 12:11 AM

Trackback Pings

TrackBack URL for this entry:
http://thequality.com/mt/mt-tb.cgi/208

Comments

Post a comment




Remember Me?