Oh, the pain of HTML!
I had truly forgotten what a royal bitch it can be to work with HTML sometimes...
Working with Niko's new design for OSFlash last night was fun as I was tweaking the style and updating DokuWiki. Today, I noticed that the site wasn't validating as XHTML Transitional. I fixed all but one of the problems: "Byte-Order Mark found in UTF-8 File." Who? What? When? Why? Wassup?
The validator had this to say: "The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported."
Oh, OK, so there are some funny hidden characters at the start of the document that I need to remove. Simple! (Cue ominous staccato tremolo of a violin...)
So I go track down the offending files to Niko's template using Notepad2 to check for file encodings, all the while thinking: "Niko should use a better editor". I dutifully change the files so that they are UTF-8 not UTF-8 With Signature. I upload. I test with the validator. The site validates. I'm happy. The world is good. Somewhere, a bird starts chirping.
All chirping and other merriment suddenly grounds to a halt when I test the site in IE. I gaze, mouth agape, as the content of the site displays under the navigation panels. "But I... I... standards... XHTML...", I fume, froth and friddabble (guess which word I just made up!)
Lo and behold, I test the site in both Firefox and Opera and it renders beautifully. Even the bird gleefully leaks a few unrestrained chirps.
Some head scratching later, I narrow down the issue to the Byte-Order Marks that I removed. Apparently IE needs them for some reason to display the site properly and NikO, in his infinite wisdom and knowledge of the ins and outs of HTML had apparently purposefully included those in key files in the template.
But can you believe it? An XHTML-compliant design failing on a browser because a hidden mark in the file is missing. (Yeah, I know -- things like that are the norm in the HTML field, with most problems caused by IE, but it's just such a strange concept to someone who has worked with a truely write-once-run-anywhere platform for so long.)Man, I thank my lucky stars every day that I haven't had to rely on HTML for my living for nearly the past seven years now. The Flash Platform isn't perfect by any means but it's definitely getting closer to it and you really forget too easily what a joy it is not to have to worry about browser compatibility issues so you can just concentrate on the business logic :)