Reputation: 10022
As I use the web, I regularly get runtime errors (usually javascript) being reported via popups. This can make for a really unsatisfying user experience on many otherwise excellent websites and also makes me wonder what functionality I am not getting access to.
Why is this such a common issue? Is this down to a lack of testing or is it browser compatibility issues? What can be done to minimise this kind of issue?
Incidently I don't have the 'Display a notification about every script error' checked.
Upvotes: 0
Views: 493
Reputation: 5119
Yes, the problem is usually testing. Most serious developers will try to test their webpage in many browsers, but there is really many browsers and versions so you can't really test them all.
I usually test when designing using Opera and Firefox, and my collegue who used a Mac tested it in Safari too; then from time to time boot a Vista box (I'm running linux and IE's for linux just isn't reliable to copy all strange IE behaviour) and test it on IE (usually 7 and 8 beta). I would recommend to any web developer not to design using IE! The websites that have the most errors is obviously "designed for IE" because they barely works in other browsers and pops more errors. If you design using the standards and test using relatively standard compliant browsers like Opera, Firefox and Safari and then add the dreadful hacks for IE preferably using conditional comments (allthough it is nonstandard and proprietary, it's fortunately, and correctly, regarded as commendt by real browsers so you won't break the working code) you have less problems.
Another reason for errors is that one use frameworks wich is designed to work around browser differences and as a side effect, or possibly just because of an bug, pops error messages in some browsers. I certainly haven't got time to fix a framework just to remove a error message, and unless I can work around the problem and it basically works anyway, I must ignore the error messages, possibly file a report and hope it will be fixed in the next version (or even better hope IE suddenly and magically cease to exist :)
Upvotes: 0
Reputation: 103145
Its a number of issues.
Upvotes: 1
Reputation: 1846
It's easy to make mistakes in JavaScript. Until recently with Aptana, there weren't many good tools for coding JavaScript. Not have the benefit of syntax checking or compilation, small typing error can make it into pages. Beyond that, there are time where code that works fine in one browser will cause an error in another. For example, I saw a jQuery plugin that didn't work in IE, but it was fine in every other browser. It turned out to be a variable declared without the 'var' keyword. Firefox and Safari were OK with that, IE wasn't, so it's possible that whoever wrote the code didn't even know it was a problem.
Upvotes: 0