Web page runtime errors

Since I am using the web interface, I regularly get runtime errors (usually javascript) that are reported via pop-ups. This can make a very unsatisfactory user experience on many other great websites, and it also makes me wonder what functionality I am not accessing.

Why is it such a common problem? Is it due to a lack of testing or a browser compatibility issue? What can be done to minimize this kind of problem?

By the way, I don't have "Show notification of all script errors".

0


source to share


4 answers


He has a number of problems.



  • Many web page builders copy and paste JavaScript code from the web. They are not programmers and cannot appreciate the nuances of the language.
  • Lack of good testing systems (at least I don't know). For Java, we have JUNIT and .NET NUNIT, etc. Its tricky to automate JavaScript testing nowadays.
  • Poor IDE support. Until recently, most IDEs did a poor job of supporting JavaScript. Now I see more support, but still not what you get for the main languages.
+1


source


I put it on lack of testing.



+1


source


It's easy to make mistakes in JavaScript. Until recently, there were few good JavaScript coding tools with Aptana. Doesn't have the advantage of syntax checking or compilation, a small input error can make it on pages. Also, there are times when code that works great in one browser throws an error in another. For example, I saw a jQuery plugin that didn't work in IE, but it worked fine in every other browser. It turned out to be a variable declared without the 'var' keyword. Firefox and Safari were fine with this, IE wasn't, so it's possible whoever wrote the code didn't even know it was the problem.

0


source


Yes, the problem is usually tested. Most serious developers will try to test their web page in many browsers, but there are indeed many browsers and versions, so you cannot fully test them.

I usually test when developing using Opera and Firefox, and my colleague who used a Mac tested it in Safari too; then load Vista window from time to time (I run linux and IE for linux just not reliably copy all the strange IE actions) and test it on IE (usually 7 and 8 beta). I would recommend any web developer to not build with IE! The websites with the most bugs are obviously "designed for IE" because they hardly work in other browsers and cause more bugs. If you develop standards and test using relatively standard compatible browsers like Opera, Firefox and Safari, then add horrible IE hacks, preferably using conditional comments (even though it is non-standard and proprietary, it is thankfully and rightly regarded as commendt by real browsers so you don't break the working code) you have fewer problems.

Another reason for errors is that some are using frameworks that are designed to deal with browser differences, and as a side effect, or perhaps just because of a bug, cause error messages in some browsers. I certainly don't have time to fix the framework just to remove the error message, and if I can't get around the problem, and basically it works, I should ignore the error messages, maybe log a report and hope it does fixed in next version (or even IE's best hope suddenly and magically ceases to exist :)

0


source







All Articles