I mentioned briefly on my personal weblog this morning that my navigation tooly thingy didn’t seem to work in MSIE 6. I found and located the problem, and wrote this message to *webtalk on MC to talk about it:
I was not surprised this morning to find that a new bit of javascript code I had written did not work in MSIE 6. I hadn’t previously had a chance to test it it anything other than Mozilla, but it used nothing but DOM level 1 to do its work… but I still wasn’t surprised to find it didn’t work.
I was surprised to find out why it didn’t work. I had encoded my scripts as <script language=”JavaScript” type=”application/x-javascript”>, which looks nice and proper. The ‘language’ attribute is depreciated in favour of the ‘type’ attribute in HTML 4… but with that type attribute, my scripts weren’t being run at all in MSIE6. MSIE6 does not support ‘application/x-javascript’, which I’d gotten used to using as a MIME type in Mozilla.
In the process of figuring out why it doesn’t, I’ve read that it might even be correct. MSIE6 does not have an implementation of JavaScript, but rather its own ‘JScript’ implementation of the ECMA Script standard. So, the proper type for this script oughta be ‘text/ecmascript’, which MSIE 6 understands. …… and …. wait for it …. Mozilla doesn’t.
However, both MSIE6 and Mozilla execute ‘text/javascript’ script types. I think it was a compromise, Mozilla wanted ‘application/x-javascript’ and MSIE6 wanted ‘text/ecmascript’, so they came out with ‘text/javascript’. In summary, web standards are good, I just wish they were better.
This web page has been extremely helpful in determining which script types are supported: http://www.robinlionheart.com/stds/html4/scripts.html
I just love the web. All those computers working together based upon mutual understanding thanks to beautiful standards. But I think we were better off with gopher and telnet.