Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avoiding messy browser's death

During the past few months, I've been working on a large web application. Repeatedly, we've written code that, according to DOM & JS specifications, should work perfectly, but still manages to completely kill one or more of our test browsers -- recently, we produced pure JavaScript code that should have been harmless but causes General Protection Faults in IE8, other pieces of code that completely freeze Safari, etc.

Well, we'll solve each issue, item by item, with as much blood, sweat and code as it takes. But the question I have in mind is the following: is there a knowledge base on such browser frailties? Something comparable to quirksmode.org, but with guidelines on how to code stuff to avoid killing our browsers?

Thanks.

edit Precision: not that it changes anything to the question, but we're using jQuery.

like image 900
Yoric Avatar asked Oct 30 '10 16:10

Yoric


2 Answers

You've probably already been down this road, but most of the major libraries like jQuery, Prototype, YUI, Closure, or any of several others are going to have run into most of these issues and coded around them for you already.

like image 127
T.J. Crowder Avatar answered Sep 28 '22 11:09

T.J. Crowder


If you are writing manual DOM/JS, please use a library as T.J. Crowder mentioned. These libraries solve nearly all the common inconsistencies between DOM libraries and make a usable sugar sweet API layer on top.

I have listed a bunch of websites that document cross-browser bugs in a previous answer.

like image 23
meder omuraliev Avatar answered Sep 28 '22 09:09

meder omuraliev