getElementByID in IE 8 compared to previous versions

Found this post about the getElementByID method in Javascript by accident and thought it would be worth posting about.

The basic issue is is that IE 8 compares the id’s is a case-sensitive manner whereas previous versions of IE compare in case-insensitive manner when IE 8 is in actual IE 8 mode. (MS Doc Here)

I always try and keep my identifiers in the same case in all cases, and this is just another reason for me to keep doing that!

Moral of the story: No matter what you do and what language you work in you should endeavour to keep the casing of variables, css classes, uri etc, in exactly the same case in all instance. This helps when in the future something like this happens.