Tuesday, February 21, 2006

A few years down the line

Javascript not all it was cracked up to be

4 or 5 years ago, I was quite pleased with myself. I had installed a javascript menu on my dads website, which appeared to work exactly as planned, in all the browsers we could test it on.

It is only now when I look at it again in a different, more experienced light that I realise how bad it is.

You can still see the menu in question at the top of www.halftimescores.co.uk which is a hobby site run by my Dad about the composer Schubert.

The menu itself is still going strong, new versions of browsers have come, and even new browsers and the menu is still there. However there is one major factor that neither me or my Dad spotted until now.

Dad spent the weekend adding a google search bar onto his site. You will have seen them before, but basically it is search powered by google that you can restrict your website. Whilst installing this it became obvious that google didn't know about all of the pages of the site.

Rats, as my dad would say

The long and the short of it is quite obvious. Google and the other search engines, don't spider javascript. 5 years ago this wasn't something I had put any thought into. The search engines were there, but I hadn't spent the time reading how to optimise them... 5 years ago people were still submitting their sites to the search engines.

What's the answer

In the short term, Dad has added two sitemaps (general sitemap, postcard sitemap) to his website. This is just text links and should be spidered by the search engines quite easily. The other tactic is this blog post, to encourage the search engines to have a look at the sitemaps (general sitemap, postcard sitemap)

In summary

Actually given what I know now, I wouldn't ever use javascript for a menu, and avoid it whenever possible. All of our sites, have accessible, valid html, and anytime we need a dropdown menu I use css tricks to do the dropping down.

Trackback Link: [A few years down the line]


Post a Comment

<< Home