Jon Raasch's notes on Nicholas Zakas's Google Tech Talk "Speed Up Your JavaScript" in which he covers basic performance improvements like local variables for more expensive lookups, avoiding for in loops, casting DOM array-like objects into proper arrays, avoid touching the DOM, use classes to change CSS instead of inline styles.
Olav Junker Kjær takes us through how browser-based JavaScript deals with events and default action, including the dispatch sequence of events, when they are bubbled and captured and the order of these events. Also shows some setTimeout() tricks to deal with long-running JavaScript
Christian Heilmann lays out seven rules to better unobtrusive JavaScript, including not making assumptions about JavaScript, the browser and the document. Work with structured markup. If you are traversing a document, maybe there's a solution that can take advantage of CSS's selector mechanism instead. Work with browsers and users. Better understanding of events, and playing nice with namespace, scope, and patterns. And of course, think about the next developer, so keep the code maintainable.
Simon Willison blogs about how JQuery won him over. From its faddish start based around CSS selectors (getElementsBySelector), and method chaining, Simon now sees the library in a new light. Simon shows how jQuery supports modern development best practice such as namespaces, giving a quick nod to the richness of jQuery selectors (DOM, CSS and XPath). JQuery's event handling looks natural and offers an event when the dom is ready. It exposes custom events for non-trivial Ajax requests. Simon's so convinced about jQuery that he's willing to overlook his rule that developers should know how a library works before using it.
A cross-browser bookmarklet to examine the box-model of any DOM element on a page. Runs on Internet Explorer, Safari (and Webkit based browsers), Mozilla (including Firefox and Camino).
A DHTML shell that allows you to query the current browser window. Includes command line JavaScript execution, mouseover DOM query, CSS input, tab completion, profiler and object inspection. Can be configured to run off a bookmarklet, and works in IE, Firefox, Safari and Opera
As web pages become more and more like applications, code performance becomes more and more important. This article looks at a number of performance issues to avoid, in EcmaScript, DOM and AJAX requests. Covers eval, the with keyword, try/catch in performance-critical code, global variables, implicit object conversion, string concatenation, primitive operations over function calls, repainting and reflowing documents, modifying elements, using XPath.
Jack Slocum presents a simple recipe to avoid memory leaks, including setting onreadystatechange to null on completion of an XMLHttpRequest, clean up DOM Event handlers on unload, never put non-primitives into a DOM node.
An online copy of O'Reilly's 2002 book Creating Applications with Mozilla. It focused on pre-1.0 versions of Mozilla, so details about the application structure has changed, but the XUL elements are relatively stable.
Another Douglas Crockford video. This time Douglas talks about the Document Object Model, about how Java failed, and JavaScript evolved thanks to DHTML and DOM. He talks about how to use DOM to traversing and manipulating elements in an HTML document, walking the DOM, making elements, innerHTML, as well as Events, memory leaks. He talks about the cracks in DOM, and how we must be prepared to back off when we hit the browser limits of DOM.
Christian Heilmann describes an approach to building complex web application by basing them around events, particularly around YUI's CustomEvent class.
Christian Heilmann's excellent guide to writing unobtrusive JavaScript. Takes the reader from the inline JavaScript world right through to a clean dynamically attached events with all the JavaScript code in external files. Covers DOM Scripting. This is the key reference to unobtrusive scripting.
Michael Mahemoff runs into a problem with Protypes $$ function when looking for class names. Its taking over 90 seconds when more than 100 matches are returned. The advice is: Avoid $$(".classname") on large DOMs.
Stuart Langridge provides unobtrusive JavaScript that makes HTML tables sortable by their table headers. To enhance a table to be sortable requires the addition of the classname sorttable
Christian Heilmann demonstrates delegating events, and compares it to the main alternative of assigning event handlers to each individual node. Its a technique that's important for writing applications that can scale.
Gez Lemon reviews Christian Heilmann's recently published book. Its a thumbs up, and recommended for developers working with standards and accessibility, regardless of their JavaScript level.
A useful overview / introduction of the jQuery library, covering using selectors and XPath expressions to target specific elements in a document, simple Ajax requests, the basic animations available, restructuring a document, creating jQuery plugins.
Mark Pilgrim's essential online book about developing Greasemonkey scripts. Excellent starting point for Greasemonkey developers. Covers everything from setting up a Greasemonkey scripts to common DOM coding idioms, as well as a brief rundown of XPath, and case studies of Greasemonkey scripts.
Mark Pilgrim dissects the security issues of the 0.3 Greasemonkey, and describes how the new architecture of Greasemonkey works, pointing out pitfalls and how to address them.
Jeremy Keith describes unobtrusive JavaScript by talking about separating content, style and behaviour.
Speeding up object detection by doing the detection once. Dean Edwards demonstrates a quick improvement using the ubiquitous addEvent function.
Dean Edwards counters Dojo's Alex Russell's hideous hacks with two standards friendly approaches. Looking at the The DOM Content loaded problem and the sluggishness of walking a DOM Tree, Dean talks about speed improvements, including the use of XPaths.