JavaScript Incompatibility Between Browsers and Netscape's Demise

I'm done!

My good work is finished and testing was a success. My task was to update the company web site to provide additional information to our customers. I've spent a bit of time working on a way to expand and/or collapse some data on the page without using a 3rd party control (preferred by my company). The information is required to be displayed in a tree-like manner with plus and minus buttions for the customer to click on. At first, I thought that this would be an easy thing to do but as it turned out it was a lot more intricate than I had initially thought.

It was all about to be published up to the web server when I thought I would take one more look at the changes in case I missed something...AND I DID!! All of my testing was done using Firefox as the primary browser. I did this in an attempt to reduce the amount of time I would need to spend in making the web site cross-browser compatible. I figured that if I tested everything in Firefox then it should work fine in IE, right? WRONG!!

As soon as the page loaded in IE I could see that something was not right and in fact nothing on the page worked as intended. This was most disappointing to find out at this late stage as now I had to rework what I had 'completed' for one browser just to make it work in another...and actually, for both. I kept thinking to myself why it is that two different browsers could interpret JAVASCRIPT in completely different ways. If both browsers are supposed to be able to run scripts written in JavaScript then why are they different? Time to find out!
Google?? Oh GOOGLE!!??!! Ahh, there you are. I have a question about why JavaScript is handled differently on different browsers and more importantly, now that Netscape is no longer being supported or developed what will become of JavaScript?

I very quickly discover that my question has been asked many, many, many times before. Here's an extract from a page in a book I found during my search. The book is titled 'The Book of JavaScript: A Practical Guide to Interactive Web Pages' by Thau and published by No Starch Press Inc.

JavaScript Works Differently in Different Browsers
Perhaps the most annoying problem with JavaScript is that it works somewhat differently in different browsers. JavaScript was introduced in 1996 by Netscape in version 2 of Netscape Navigator. Since then, JavaScript has changed, and every browser implements a slightly different version of it - often adding browser-specific features. Luckily, starting in the late 1990s, the European Computer Manufacturers Associates (ECMA) began publishing standards for JavaScript, which they call ECMAScript. About 99 percent of all browsers being used today comply with at least version 3 of the ECMA standard. These include Internet Explorer version 5.5 and later, Netscape version 6 and later, Mozilla, Firefox, all versions of Safari, and Opera version 5 and later. Because almost all browsers currently in use adhere to version 3 of the ECMA standard, I'll be using that as the standard version of JavaScript in the book. Where incompatibilities between browsers arise, I'll point them out.

Well, I'm now enlightened as to why there are differences prior to the late 1990s but why is it still occurring now and looking at that last sentence, the author is practically saying the same thing. It would seem that the effects of the early days of JavaScript are still present as a result of keeping browsers 'backward compatible' to some degree. This effectively means that the issue of JavaScript being executed differently on different browsers may never go away. However, I'm now a little more relaxed about the future of JavaScript and it's apparent 'standard' with the 'sudden??' demise of Netscape due to the well meaning efforts of the ECMA - great job people! Keep those standards coming...version 3 indeed!

For me at least, I'll be working less with JavaScript and more in ASP.Net 2.0. If I'm not able to achieve my goals without using JavaScript then I'll find a 3rd party control that will perform the function/s that I need. However, if anyone out there happens to know of any cool tools or VS plug-ins that make it easier to develop web apps by keeping things cross-browser compatible as much as possible then please let us all know.

That's it from me for now, I've ranted over and above the 2 cent entitlement and it's time to hear your thoughts on the matter.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Comments are closed