273 items tagged “javascript”
Facelift Image Replacement. Like sIFR but with JavaScript and a PHP text rendering component. I question the need for the JavaScript if you’re already generating the images on the server, but the actual generation script is nicely done—it makes smart use of ImageMagick and caches the generated images.
5th August 2008, 6:36 pm
How Comet Brings Instant Messaging to meebo. “What started off as a hack appears to be fulfilling one of the most basic needs of the Web, which is live synchronous interaction”—Jian Shen
27th July 2008, 11:18 am
Firebug Lite 1.2 (via) Huge upgrade to the IE/Opera/Safari bookmarklet version of Firebug—it now has DOM element inspection, XHR tracking and an interactive console, among other features.
27th July 2008, 9:30 am
Dojango version 0.3 released. A reusable Django application that provides Dojo, helper functions (dojo.data integration) and tools for switching between Dojo versions.
24th July 2008, 12:47 am
window.name Transport. The cleverest use of the window.name messaging hack I’ve seen yet: Dojo now has dojox.io.windowName.send for safe, performant cross-domain messaging.
23rd July 2008, 4:25 pm
php: rfc: closures (via) I never thought I’d see the day, but a patch adding closures to PHP has been both proposed and accepted! Looks like a solid implementation—the syntax is similar to JavaScript but makes explicit which variables are to be captured. As with much of PHP, values are copied in to the closure by default but you can use an ampersand to specify JavaScript-style pass-by-reference instead.
19th July 2008, 10:58 pm
quipt (via) Extremely clever idea: Cache JavaScript in window.name (which persists between page views and can hold several MB of data), but use document.referrer to check that an external domain hasn’t loaded the cache with malicious code for an XSS attack. UPDATE: Jesse Ruderman points out a fatal flaw in the comments.
4th July 2008, 3:49 pm
A browser sniffing warning: The trouble with Acid3 and TinyMCE. Opera recommend “bug detection”, a step up from object detection and browser sniffing where your JavaScript includes mini unit test style fragments of code designed to test if buggy behaviour you are working around still affects the user’s browser.
4th July 2008, 8:24 am
eval() Kerfuffle. The ability to read supposedly private variables in Firefox using a second argument to eval() will be removed in Firefox 3.1.
2nd July 2008, 9:24 pm
Javascript protocol fuzz results. If your HTML sanitizer uses blacklisting rather than whitelisting here are a few more weird ways of injecting javascript: in to a link that you need to worry about—but you should really switch to whitelisting http:// and https:// instead.
30th June 2008, 3:57 pm
Module Pattern Provides No Privacy... at least not in JavaScript(TM) (via) JavaScript variables hidden inside a closure aren’t as hidden as I thought—it turns out you can pass a closure as the second argument to eval (at least in Firefox) and “steal” private variables back out of it.
27th June 2008, 7:01 pm
BUG: XSS Security flaw in BaseCamp Messages (via) BaseCamp lets users include HTML and JavaScript in messages, on the basis that anyone with a BaseCamp account is a trusted party. I’m not convinced: you could use this to circumvent BaseCamp’s access control stuff and read messages you’re not meant to. On the flip side, you could also use this to add brand new features to BaseCamp by using JavaScript in a message as a server-side equivalent to Greasemonkey.
26th June 2008, 9:39 am
jsontime. Nat and I threw this together this morning—it runs on Google App Engine and exposes Python’s pytz timezone library over JSONP.
21st June 2008, 7:07 pm
When Bugs Collide: Fixing Text Dimming in Firefox 2. Handy tips from Drew on fixing the glitchy text rendering in Firefox 2 when you animate opacity without breaking alpha-transparent PNGs in IE6.
19th June 2008, 6:09 pm
Deep Profiling jQuery Apps. Neat plugin from John Resig that monkey-patches most (all?) of the jQuery methods to build up a detailed profile of which methods are being used by a given page.
16th June 2008, 10:20 am
Spicing Up Embedded JavaScript. John Resig collects the various ways in which a JavaScript interpreter can be hosted by Python, PHP, Perl, Ruby and Java. There are full JS implementations in PHP, Perl and Java; Ruby and Python both have modules that use an embedded SpiderMonkey.
15th June 2008, 11:32 am
Is It OK to Require JavaScript? Not if you can avoid doing so. Unobtrusive JavaScript really isn’t hard if you design it in from the start, and since stackoverflow is a community forum / questions and answers site I have trouble imagining a feature that can’t be made to work without JavaScript.
10th June 2008, 6:41 am
OS OpenSpace from Ordnance Survey (via) Ordinance Survey now provide a free JavaScript mapping API for “non-commercial purposes” by “private individuals”. The maps look incredibly detailed, although I can’t find any live API demos on the site (the documentation is illustrated with screenshots).
9th June 2008, 8:30 am
Updated jQuery Bookmarklet. Nicer than my own “Inject jQuery” bookmarklet because it drops in a temporary message confirming that jQuery has been imported (or telling you that jQuery was already present).
8th June 2008, 8:46 pm
An interview with 280 North on Objective-J and Cappuccino. Fantastic comment thread with involvement from the guys who created Objective-J. Just like Objective-C, Objective-J is a preprocessor that runs against regular JavaScript source files so you can use JavaScript and Objective-J idioms interchangeably.
7th June 2008, 7:40 pm
280slides and Objective-J. 280 slides uses an Objective-C clone written in 13KB of JavaScript. I have to admit I’m completely baffled as to why you would want to use Objective C instead of JavaScript, but evidently it worked fantastically well for them.
7th June 2008, 4:09 pm
SquirrelFish. WebKit’s JavaScript engine was no slouch, but that hasn’t stopped them from replacing it with a brand new “register-based, direct-threaded, high-level bytecode engine, with a sliding register window calling convention”. It runs 1.6x faster and has the Best Logo Ever.
3rd June 2008, 7:57 am
Google Earth in a browser (sort of), Scriptable, a quick peek and poke. Dan Catt on Google’s new browser plugin version of Google Earth... which conveniently exposes a JavaScript API to the browser in the form of the “ge” object, which can then be poked at interactively using Firebug.
28th May 2008, 11:13 pm
QUnit. The jQuery unit testing framework is now documented and supported as a separate project.
26th May 2008, 5:31 pm
AOP aspect of JavaScript with Dojo. Fantastic post—concisely explains Aspect Oriented Programming, then shows how Dojo’s dojox.lang.aspect brings AOP to JavaScript, including some really useful built-in aspects for logging, profiling and more. Aspects are like Python decorators on steroids.
18th May 2008, 10:45 am
Dopplr place googlemaps, with and without Yahoo Geo API bounding box adjustment. Dopplr uses Geonames for most geo information, but is now mixing in bounding box data from the Yahoo! Geo web service to improve the default zoom level for their maps. The JSON callback API means no server-side code is required on Dopplr’s end.
17th May 2008, 11:35 pm
Firebug Command Line API. Another thing I didn’t know about Firebug: you can set a breakpoint at the start of a function with “debug(fn)” and log all calls to it with “monitor(fn)”.
16th May 2008, 12:14 pm
Cubescape. Beautiful isometric cube building tool by Cameron Adams, written in JavaScript and jQuery.
15th May 2008, 8:40 am
Crossdomain.xml Invites Cross-site Mayhem. A useful reminder that crossdomain.xml files should be treated with extreme caution. Allowing access from * makes it impossible to protect your site against CSRF attacks, and even allowing from a “circle of trust” of domains can be fatal if just one of those domains has an XSS hole.
15th May 2008, 8:06 am
Engineering @ Facebook: Facebook Chat. The new Facebook Chat uses Comet (long polling with a hidden iframe) against a custom web / chat server written in Erlang, designed to handle a launch to all 70 million users at once. It was tested using a “dark launch” period where live pages simulated chat request traffic without showing any visible UI.
15th May 2008, 7:55 am
goog/useragent/iphoto.js. The Goog library includes code to detect the user’s installed version of iPhoto, based on reverse engineering the Mac.com Gallery RSS feeds. This has Mark Pilgrim written all over it.
14th May 2008, 9:21 pm
Doctype: /trunk/goog. Google’s newly released JavaScript library (pure JavaScript, so more along the lines of YUI and jQuery than GWT). I haven’t found the documentation for it yet, but the code is extremely well commented. UPDATE: The documentation is spread throughout Doctype.
14th May 2008, 9:12 pm
Doctype on Google Code. Alternative way of browsing Google Doctype—if you link to articles here instead of using the permalinks in the official version non-JavaScript user agents will be able to access the content you’ve linked to.
14th May 2008, 8:34 pm
Google Maps now shows photos and Wikipedia articles. Click the “More...” button. My first thought was “how do they get so many photo markers on the map?”—Firebug shows that they’re generating tiles on the server containing multiple photo markers, then when you click on one an Ajax call checks which photo is in that particular spot.
14th May 2008, 7:10 pm
Session variables without cookies. Brilliant but terrifying hack—you can store up to 2 MB of data in window.name and it persists between multiple pages, even across domains. Doesn’t work with new tabs though, and storing JSON in it and eval()ing it is a bad idea—a malicious site could populate it before sending the user to you.
13th May 2008, 9:59 pm
Hey Google: any chance we can all build the social web together without requiring JavaScript?
— Me
13th May 2008, 1:49 pm
Persevere adds Comet Support. Persevere sounds neat: a RESTful HTTP/JSON data store (the interface reminds me of CouchDB) which recently gained the ability to “subscribe” to a resource and receive notifications of updates via comet.
13th May 2008, 8:09 am
Processing.js. John Resig’s outstanding port of the Processing visualisation language to JavaScript and Canvas. Runs amazingly well in Firefox 3. One hell of a hack.
9th May 2008, 8:24 am
Unobtrusive JavaScript with jQuery. The online handout for the tutorial I gave this morning at XTech.
6th May 2008, 6:53 pm
Reading binary files using Ajax. There’s a simple trick for Firefox, and (amazingly) you can get IE to play along using a function written in VBScript.
22nd April 2008, 7:02 pm
Embedding custom non-visible data in HTML 5. “Every HTML element may have any number of attributes starting with the string ’data-’ specified, with any value.”—this will be incredibly useful for unobtrusive JavaScript where there’s no sensible place to store configuration data as HTML content. It will also mean Dojo has an approved method for adding custom attributes to declaratively instantiate Dojo widgets.
19th April 2008, 10:58 pm
JavaScript: The Good Parts. Douglas Crockford’s soon-to-be-published book on the subset of JavaScript that he recommends. Promises to be “short, but dense”—if it’s half as good as his JavaScript lectures this is going to be a must-have.
19th April 2008, 4:38 pm
Comet at the Highland Fling. I thoroughly enjoyed the Highland Fling yesterday. Here are the slides from my talk on Comet.
4th April 2008, 10:13 am
Implementing a syntax-higlighting JavaScript editor in JavaScript. Appropriately subtitled “a brutal odyssey to the dark side of the DOM tree”. Some seriously clever trickery going on here.
4th April 2008, 8:27 am
Advanced JavaScript Debugging Techniques. There’s more to JavaScript debugging than just Firebug.
4th April 2008, 7:51 am
Brendan Eich: Popularity. I never knew that Brendan went to Netscape on the promise of “doing Scheme in the browser”.
4th April 2008, 7:30 am
Classy Query. Beautifully implemented parody of class-based JavaScript and verbose namespacing as a jQuery extension, from John Resig. The source code has some neat tricks in it, in particular the buildClass() function.
1st April 2008, 9:48 am
getElementsByClassName pre Prototype 1.6. Older releases of Prototype break in Firefox 3 and Safari 3.1 due to unsafe namespace management—getElementsByClassName is now a browser built-in but with different semantics to the Prototype method of the same name. Prototype 1.6 is fine.
26th March 2008, 8:28 am
Firebug + Dijit tips. News to me: Firebug has a magic $1 variable which corresponds to the currently selected node. Very handy.
17th March 2008, 2:08 am
dojox.gfx demos. Impressive demos of the Dojo 2D drawing APIs—these need to be linked from the dojo site, it took me quite a while to find them.
16th March 2008, 4:24 pm
JavaScript in Internet Explorer 8. John Resig’s analysis. News to me: IE 8 doesn’t support the W3C event model—I had assumed that would be a priority.
6th March 2008, 11:59 pm
Internet Explorer 8 Readiness Toolkit. The new built-in development tools look similar enough to Firebug to make me very happy. Also of interest: Selectors API (for fast getElementsBySelector), CSS 2.1 support, support for XHTML style namespaces in HTML, an interesting Web Slices feature based on the hAtom microformat and 6 connections per host (up from 2) which should make Comet easier.
5th March 2008, 6:28 pm
Acid3 is out. The third Acid test, again compiled by Ian Hickson. This one viciously tests DOM Scripting standards compliance and currently exposes flaws in every browser.
5th March 2008, 12:34 am
CouchDB, XML, and E4X. Brilliant—CouchDB now enables SpiderMonkey’s E4X support, meaning CouchDB views can easily query XML documents stored inside JSON objects using E4X syntax.
5th March 2008, 12:31 am
Gears 0.2 Released! New modules are HttpRequest and Timer, both for use within workers (which provide Erlang-style message passing concurrency). Particularly interesting is that the Gears HttpRequest module can be used for much cleaner Comet implementations in IE.
5th March 2008, 12:21 am
xssinterface (via) Clever JavaScript library for implementing opt-in cross-domain messaging in JavaScript (allowing communication between pages and iframes on different domains). Uses HTML 5’s postMessage API if available, otherwise falls back on either Google Gears or a clever cookie hack.
5th March 2008, 12:08 am
Flickr Uploadr: Open Source and Powered by XULRunner. Quietly released a few months ago; it’s really nice.
13th February 2008, 11:30 pm
jQuery 1.2 Cheat Sheet. Handy. It helps that most of jQuery’s method names are pretty much self explanatory once you’ve been using the library for a couple of weeks.
10th February 2008, 9:12 pm
Event Delegation Made Easy. Dan Webb demonstrates a neat trick for event delegation in jQuery, using CSS selectors and the jQuery .is() method to dispatch to different callbacks from a single event handler based on the target of the event.
10th February 2008, 3:13 pm
Transitioning from Java Classes to JavaScript Prototypes. Peter Michaux shows how JavaScript’s prototypal inheritance can run rings around traditional Java-style classes once you figure out how to take advantage of it.
10th February 2008, 3:10 pm
Cross-Window Messaging. Now in Firefox 3 trunk, the HTML 5 specified ability for JavaScript to send messages between windows (or iframes) hosted on different domains. Fantastically powerful, but must be implemented with care to avoid accidentally processing bad messages from malicious third parties.
10th February 2008, 12 pm
querySelector and querySelectorAll. WebKit now supports the W3C Selectors API. Expect the various JavaScript libraries to add this as an optimisation to achieve massive speedups (Prototype are already working on it).
8th February 2008, 11:21 am
Low Pro For jQuery? Dan Webb on why he prefers Prototype over jQuery: “The one big reason was that, while jQuery was super simple and concise when working on smaller projects, it offered no help in structuring larger applications”.
3rd February 2008, 10:16 pm
Faster JavaScript Trim. Neat optimisation post—it turns out that while regular expressions are great for removing leading whitespace you can do a lot better at trailing whitespace by manually looping backwards from the end of the string.
3rd February 2008, 10:12 pm
Let me be again clear here that Comet isn’t a new single technique. Rather, it’s a combination of existing push technologies with further research into new methods that together provides a robust framework for pushing data to all clients on modern networks.
— Michael Carter
3rd February 2008, 10:04 pm
Blob Sallad—canvas tag and JavaScript physics simulation experiment. Björn Lindberg provides a detailed code walkthrough of his brilliant canvas demo, inspired by Loco Rocco.
26th January 2008, 12:25 pm
jQuery.ScrollTo (via) Neat jQuery plugin for animated scrolling of both windows and overflow elements.
21st January 2008, 9:53 pm
Dangers of remote Javascript. Perl.com got hit by a JavaScript porn redirect when the domain of one of their advertisers expired and was bought by a porn company. Nat Torkington suggests keeping track of the expiration dates on any third party domains that are serving JavaScript on your site.
20th January 2008, 9:49 am
Automate firing of onload events. Paul Irish suggests setting up your site’s onload handlers in a single external JavaScript file then executing different handlers depending on the body element’s id attribute.
17th January 2008, 4:08 pm
.first() and .last() methods for jQuery. I got fed up of expecting these to exist, so I wrote them as a couple of one-liner plugins.
16th January 2008, 9:41 pm
jQuery 1.2.2: 2nd Birthday Present. The API stays the same, but there are some healthy speed improvements, a new way of adding custom events and (most importantly) .ready() now waits for the CSS to be ready in addition to the DOM.
15th January 2008, 8:59 am
Javascript CSS Selector Engine Timeline. It’s not every day you see a piece of code you wrote compared to a Ford Pinto :)
14th January 2008, 1:25 pm
The Art & Science of JavaScript. The JavaScript book I contributed to is now shipping! My chapter describes how to build a Flickr / Google Maps mashup entirely using client-side code (via JSON-P).
12th January 2008, 7:05 pm
Cross-Site XMLHttpRequest (via) “Firefox 3 implements the W3C Access Control working draft, which gives you the ability to do XMLHttpRequests to other web sites”—you can mark a document as available for cross-domain requests using either an Access-Control HTTP header or an XML processing instruction.
9th January 2008, 11:57 pm
$.comet (via) The first Comet (with Bayeux) plugin I’ve seen for jQuery—currently only handles long-polling over XMLHttpRequest, but still a promising start.
9th January 2008, 8:31 am
Why we switched to Jetty. Zimbra (recently acquired by Yahoo!) are using Jetty for Comet. It sounds like they are using Bayeux as well.
8th January 2008, 5:12 am
20,000 Reasons Why Comet Scales. Greg Wilkins coaxes Jetty and Bayeux in to supporting 20,000 simultaneous users per server while maintaining sub-second latency, using Amazon EC2 to run the benchmark.
7th January 2008, 8:32 am
IE7.js version 2.0 (beta). Dean Edwards has updated IE7, shifting enhancements that weren’t fixed by the real IE7 in to a new script called IE8. You can also now hotlink the library directly from Google’s servers, though I don’t know how intended Google Code’s subversion repository is for that purpose.
6th January 2008, 11:15 pm
EditArea. Impressive JavaScript source code editor, with syntax highlighting, brace matching, search and replace and more.
1st January 2008, 12:09 pm
JavaScript: It’s Just Not Validation! I like the explanation of JavaScript as offering input assistance rather than validation.
1st January 2008, 12:07 pm
Django and Comet. How to build a chat application using Django and the Orbited comet server. Orbited can be set up to proxy most requests through to a Django backend while handling any comet requests itself.
26th December 2007, 9:05 pm
AppJet: Instant Web Programming. Another attempt at simple server-side JavaScript application hosting. Worth checking out for the impressive syntax highlighting code editor, which even matches braces.
15th December 2007, 3:37 pm
ExtInfoWindow 1.0: Ajax powered, CSS customization. Finally, a semi-official way of creating customised info windows for the Google Maps API. You lose the default shadow but gain the ability to style the entire info window using CSS.
15th December 2007, 12:22 pm
Two-Faced Django. Excellent Django tutorial by Will Larson that shows how to build a polling application with an interface both on the Web and in Facebook. Also touches on unit testing and Ajax using jQuery.
14th December 2007, 2:44 pm
Unobtrusively Mapping Microformats with jQuery. My contribution to 24 ways: using Mapstraction to geocode hCards (extracted with jQuery) and plot them on a Google Map.
12th December 2007, 12:28 am
The Future of Comet: Part 1, Comet Today. Absolutely the best summary I’ve seen of all of the current Comet techniques in one place.
11th December 2007, 1:13 pm
Insert Dojo and YUI bookmarklets. Combine with Jash for interactive API experimentation on any web page.
9th December 2007, 12:38 pm
Jash: JavaScript Shell (via) An advanced JavaScript interactive shell bookmarklet that works in IE, Firefox, Opera and Safari.
9th December 2007, 12:36 pm
JavaScript Internationalisation, explained by reindeer. “Santa even spooked Comet recently by talking about him as if he were some pushy web server.”
8th December 2007, 2:04 pm
Comet works, and it’s easier than you think
I gave a talk this morning at the Yahoo! Web Developer Summit on Comet, cometd and Bayeux. I’ve been trying to keep up with Comet ever since Alex coined the term last year, but it’s only in the past few weeks that I’ve actually found some time to play with it myself. I was very impressed with what I found: the open source infrastructure for building and deploying Comet applications is surprisingly mature, and with just a few more improvements I can see Comet achieving much more widespread use. [... 1297 words]
YUI 2.4.0 released. Lots of great new features, but the one I’m most excited about is Selector: YUI finally has a CSS query engine.
5th December 2007, 3:32 pm
Datejs—A JavaScript Date Library. Building a date API around chaining—Date.today().next().thursday()—is a neat concept. I’d like to see that adapted for Python’s datetime library.
3rd December 2007, 9:01 pm
Transparent PNGs in Internet Explorer 6. 24ways kicks off again, with the first article introducing super-sleight, an updated script for getting transparent PNGs to work in IE6.
1st December 2007, 12:03 am
Jetty WebServer. Jetty 6.1 was the only cometd / Bayeux implementation I tried which worked out of the box.
27th November 2007, 6:43 pm
Deconstructing Facebook Beacon JavaScript. How Facebook’s new Beacon service (also known as “Facebook ruined Christmas”) actually works.
25th November 2007, 9:20 pm
DebugBar. Suggested at BarCamp London 3 as a useful tool for developing with IE; apparently includes a great JavaScript debugger.
25th November 2007, 10:32 am
A Taxonomy of Event- and REST-based Comet. Kris Zyp describes a conceptual model for Comet messages based on REST semantics (so you can send a PUT referencing a specific URI down to a client to represent an idempotent state change).
21st November 2007, 8:18 pm
Weewar (Nat v.s. me). Really impressive turn based strategy game, implemented entirely in the browser. Surprisingly addictive; you have been warned.
20th November 2007, 11:52 pm
IE ActiveX(“htmlfile”) Transport, Part II. Fascinating tricks for working around IE memory leaks using explicit CollectGarbage() calls and setInterval() to an empty function.
19th November 2007, 11:48 am
JavaScript Beautifier (via) Useful online tool (source code also available) for un-obfuscating JavaScript that has had its whitespace stripped out.
16th November 2007, 8:43 pm
Yahoo! Search Contextual Precaching. Neat performance trick on Yahoo! Search: the moment you start typing (indicating you intend to search) the site quietly fires off a bunch of requests to precache assets needed for the search results page.
16th November 2007, 3:58 pm
Taking the canvas to another dimension. Opera have finally released a test version with support for a opera-3d canvas context—Windows only for the moment, but Mac and Linux versions are promised “soon”.
16th November 2007, 1:39 pm
Ten New Things in WebKit 3. Does “incremental updates for persistent server connections” for XMLHttpRequest mean Safari now has native support for Comet?
16th November 2007, 1:19 am
google-axsjax (via) “The AxsJAX framework can inject accessibility enhancements into existing Web 2.0 applications using any of several standard Web techniques”—including bookmarklets and Greasemonkey. The enhancements conform to W3C ARIA, supported by Firefox 2.0 and later.
14th November 2007, 5:18 pm
JavaScript Method Overloading. John Resig shows a clever trick for overloading JavaScript methods based on the number of arguments, using the little-known .length property of a JavaScript function object.
13th November 2007, 2:39 pm
HTML5 Media Support in WebKit. WebKit continues to lead the pack when it comes to trying out new HTML5 proposals. The new audio and video elements make embedding media easy, and provide a neat listener API for hooking in to “playback ended” events.
12th November 2007, 11:21 pm
Eye-Fi launches. Really neat idea: a digital camera SD card with built-in WiFi to beam your photos straight to your laptop. SitePen built the UI, which runs in your browser on top of Dojo and talks to a small web server running locally.
11th November 2007, 10:40 pm
JavaScript Madness: Keyboard Events. Keyboard events in JavaScript are a total pain. This looks like a pretty comprehensive reference to getting them to work cross-browser.
9th November 2007, 11:07 pm
Pseudo-custom events in Prototype 1.6. Useful tutorial showing how to use Prototype 1.6’s custom events to implement a cross-browser mouse wheel event.
9th November 2007, 11:02 pm
dojo.NodeList API docs. Support in Dojo for jQuery-style chaining operations.
8th November 2007, 11:16 am
In the long term, I want to replace JavaScript and the DOM with a smarter, safer design. In the medium term, I want to use something like Google Gears to give us vats with which we can have safe mashups. But in the short term, I recommend that you be using Firefox with No Script. Until we get things right, it seems to be the best we can do.
— Douglas Crockford
7th November 2007, 3:36 pm
Announcing Dojo 1.0. The tough learning curve that accompanied 0.4 and earlier has been replaced with an elegant core module (dojo) and two exciting subprojects (dojox and dijit). Well worth a look.
7th November 2007, 1:17 pm
Comet Daily. New regularly updated site covering Comet, the Ajax-like umbrella term for JavaScript server-push techniques. Already a bunch of great stuff on there.
7th November 2007, 10:53 am
Gmail Greasemonkey API (via) The new version of Gmail includes API hooks for Greasemonkey script authors. The documentation is by Mark Pilgrim, author of Greasemonkey Hacks.
7th November 2007, 10:38 am
How to make Ajax work for you. Slides from my three hour Ajax tutorial, presented at Web 2.0 Expo Berlin on Monday.
7th November 2007, 10:35 am
The Story Behind ES4. If you’re scratching your head at the recent eruption of acrimony surrounding ECMAScript 4 (the next standardised version of JavaScript) Neil Mix has a relatively easy to follow catch-up post.
2nd November 2007, 6:15 am
Site-specific browsers and GreaseKit. New site-specific browser tool which lets you include a bunch of Greasemonkey scripts. For me, the killer feature of site-specific browsers is still cookie isolation (to minimise the impact of XSS and CSRF holes) but none of the current batch of tools advertise this as a feature, and most seem to want to share the system-wide cookie jar.
25th October 2007, 7:56 am
Upgrading to Prototype 1.6: real world examples. I still don’t find Prototype as intuitive as jQuery, but the API improvements between 1.5 and 1.6 are very impressive.
24th October 2007, 7:19 pm
jQuery Logging (via) Brilliant four line jQuery plugin that lets you insert Firebug console.log() calls directly in to chains.
19th October 2007, 12:52 pm
CouchDB first impressions. Jacob’s been poking at CouchDB. Inserting data is slow, but everything else looks pretty slick considering how recently the JSON / JavaScript views functionality was added.
19th October 2007, 11:43 am
Dealing with the Flexibility of JavaScript. Some thoughts on function signature overloading in JavaScript.
16th October 2007, 11:24 am
The Art & Science of JavaScript. My first author credit: I’m contributing a chapter to SitePoint’s next JavaScript tome.
15th October 2007, 10:35 pm
Using the jQuery test suite for your own projects. jQuery’s test suite has clever start(), stop() and expect() methods for running assertions within asynchronous code.
12th October 2007, 12:56 pm
Global namespace pollution in IE. Another reason to avoid JavaScript global variables like the plague: IE creates a bunch of them for you which may well intefere with your own code.
10th October 2007, 10:10 am
Native DOMContentLoaded is coming to Safari. I filed this bug over two years ago. They’ve just committed the resulting patch to trunk.
8th October 2007, 1:07 am
Roll out your own JavaScript Interfaces. Dustin shows how to build a tiny jQuery-style (chainable) library that contains your own JavaScript convenience functions.
6th October 2007, 12:20 am
I have another technique [...] that I’ll be switching jQuery to. If you attempt to insert into the document.body before the document is fully loaded, an exception is thrown. I take advantage of that to determine when the document is fully loaded.
— John Resig
26th September 2007, 12:21 pm
DOMContentLoaded for IE, Safari, everything, without document.write. Stuart has taken Hedger’s recent IE technique, combined it with the others and compressed it in to a short-as-possible code snippet that you can paste in to your scripts without having to include the whole of jQuery/YUI/Dojo/Prototype.
26th September 2007, 12:19 pm
IEContentLoaded. An alternative method of detecting DOMContentLoaded on IE; works by polling until the doScroll() method on an unattached element stops throwing errors.
24th September 2007, 12:10 pm
Hello JS-CTYPES, Goodbye Binary Components. Mark Finkle is porting Python’s ctypes functionality to the Mozilla platform, to allow binary XPCOM components to be defined in pure JavaScript.
22nd September 2007, 11:57 pm
Apparently if you try to remove/destroy/trash a FORM dom node in IE6, it won’t delete it, instead creating a bizarre orphaned node stuck sucking up memory until the browser window is refreshed.
— Jon Sykes
20th September 2007, 1:04 pm
ActsAsUndoable. Lawrence Carvalho shows how robust undo functionality can be added to a JavaScript application through careful application of the Memento design pattern.
18th September 2007, 3:51 pm
The Elements of JavaScript Style. Douglas Crockford illustrates better coding practises through refactoring of old code.
13th September 2007, 8:22 am
jQuery 1.2. Lots of neat new stuff; my favourite new feature is “Partial .load()” which lets you pull in HTML with Ajax and then use a CSS selector to grab a subset of that page and inject it in to the DOM.
11th September 2007, 8:44 am
Google Maps API gets clickable polylines and polygons. Interesting explanation of how they optimised calculating the distance to the nearest point on a polyline.
8th September 2007, 12:58 pm
Protoscript (via) JavaScript tool designed for easy prototyping of JS interactions; powered by YUI and jQuery.
7th September 2007, 10:55 pm
HTTPOnly cookie support in Firefox. Five years after the bug was filed, HTTPOnly cookie support has gone in to the Mozilla 1.8 branch. This is a defence in depth feature that has been in IE for years—it lets you set cookies that aren’t available to JavaScript, and hence can’t be hijacked in the event of an XSS flaw.
6th September 2007, 6:27 am
CouchDb: Some Context. CouchDb developer Jan Lehnardt wrote up detailed notes on slides from a presentation he gave back in June, explaining most of what’s interesting about CouchDb (although without the new JavaScript function query language).
4th September 2007, 2:31 am
CouchDB: Thinking beyond the RDBMS. CouchDB is a fascinating project—an Erlang powered non-relational database with a JSON API that lets you define “views” (really computed tables) based on JavaScript functions that execute using map/reduce. Damien Katz, the main developer currently works for MySQL and used to work on Lotus Notes.
3rd September 2007, 9:48 am
Freebase. Out of closed beta, although you still need an invite code to contribute. I hope they drop the JavaScript requirement for viewing content on the site.
3rd September 2007, 2:35 am
Google Web Toolkit: Towards a better web. Good overview of why GWT exists, but I take exception to the title: requiring JavaScript to even display something does not make the web “better”.
29th August 2007, 8:21 pm
jQuery 1.1.4: Faster, More Tests, Ready for 1.2. The backwards compatibility policy for 1.2 is pretty clever: provide a plugin that restores removed functionality (such as XPath selectors).
24th August 2007, 4:22 pm
Building a JavaScript Library. Slides from John Resig’s Google Tech Talk. Some great tips in here, including: make your APIs orthogonal, look for common patterns, keep things extensible and write the documentation yourself.
24th August 2007, 4:02 pm
Live Query jQuery plugin. Ingenious plugin that lets you register jQuery event bindings to be executed when a new element matching the provided selector is added to the DOM. Performance is kept snappy by only running the check after a jQuery DOM manipulation method has been executed (append, prepend, attr etc); it won’t notice elements added using regular DOM methods.
22nd August 2007, 10:01 pm
Fixing GC issues on IE 6: New IE download. Microsoft have released Windows Script Host / Script Runtime version 5.7, which apparently cleans up a bunch of IE 6 memory leaks.
17th August 2007, 11:50 pm
Learning jQuery. An entire year’s worth of jQuery tutorials, split in to beginner, intermediate and advanced.
17th August 2007, 11:50 am
Operation Aborted. Another fantastically obscure IE bug: appending new elements to the HEAD element breaks if a BASE tag is present.
16th August 2007, 11:21 am
Prototype 1.6.0 release candidate. Prototype gets a long-needed update to its Event API, and some interesting new Function.prototype extensions.
16th August 2007, 8:49 am
Some Notes on the YUI Rich Text Editor. Dav Glass explains how he achieved the impressive feat of building a rich text editor widget that also works in Safari.
15th August 2007, 8:13 pm
Lazy Function Definition Pattern. Neat JavaScript trick: redefine a function the first time it’s called, for example to switch in different browser implementations based on object detection.
15th August 2007, 6:57 pm
jQuery for JavaScript programmers
When jQuery came out back in January 2006, my first impression was that it was a cute hack. Basing everything around CSS selectors was a neat idea (see getElementsBySelector) but the chaining stuff looked like a bit of a gimmick and the library as a whole didn’t look like it would cover all of the bases. I wrote jQuery off as a passing fad. [... 2608 words]
Background Iframe (bgiframe). jQuery plugin that inserts an iframe shim behind an element in IE, allowing the element to be positioned overlapping a select box without the select box showing through.
9th August 2007, 2:54 pm
SproutCore (via) MVC JavaScript framework used to build the new .Mac Web Gallery application.
7th August 2007, 11:35 pm
CodePress. “Real Time Syntax Highlighting Editor written in JavaScript”.
7th August 2007, 10:49 pm
jQuery in 15 minutes. A quick introduction I put together. Much more interesting in conjunction with Firebug powered demos.
7th August 2007, 2:57 pm
The Wii Remote API. “allows the Web page to detect all Wii Remotes that are connected to the Wii [...] this makes it possible to make Web pages interact with up to four users at the same time, a concept not normally possible with traditional JavaScript event detection.”
6th August 2007, 9:32 pm
YUI 2.3.0. New components are a rich text editor, dojo-style package loader, lazy ImageLoader, colour picker and unit test framework. Easier skinning as well.
1st August 2007, 8:20 am
Mouseover DOM Inspector v2.0. Steve Chipman’s excellent debugging bookmarklet created back in 2005—includes useful keyboard shortcuts for quickly manipulating the DOM of the current page.
30th July 2007, 5:13 pm
XRAY web developer’s suite (via) Smart new bookmarklet from westciv—kind of like Steve Chipman’s MODI but with the addition of the canvas element for box model visualisation.
30th July 2007, 5:11 pm
YUI-based Image Cropper Widget. Nice implementation of a useful widget.
30th July 2007, 12:56 pm
The recent announcement that Mozilla’s next JavaScript engine, Tamarin, will also be a container for functionality written in Python and Ruby (and, one assumes, beyond) is proof that JavaScript is the new Parrot.
— Aaron Straup Cope
29th July 2007, 9:17 pm
Mozilla and IronPython: IronMonkey. Interesting to note that all three new Mozilla projects are being lead by experienced Python developers.
26th July 2007, 8:07 pm
Brendan Eich: New Projects. Exciting new projects from Mozilla. ActionMonkey is joined by IronMonkey (IronPython/IronRuby on Tamarin) and ScreamingMonkey (Tamarin for IE). Upgrading IE’s JavaScript using the Flash Player as a vector is a game-changing idea.
26th July 2007, 8:05 pm
ActionMonkey (via) SpiderMonkey + Tamarin = ActionMonkey. New JavaScript engine for Mozilla 2, incorporating code from Adobe’s Open Source ActionScript VM.
24th July 2007, 3:29 pm
Building Brickslayer. New tutorial from Michal Wallace on building games in JavaScript using Prototype.
22nd July 2007, 9:28 pm
Conflicting Absolute Positions. Neat technique, although it uses CSS expressions for IE compatibility so it may break down in IE 5 and 6 when JavaScript is disabled.
17th July 2007, 10:44 pm
Low Pro Behaviours 101. A neatly packaged method of enhancing an existing DOM element with pre-packaged behaviours.
17th July 2007, 10:09 am
J4P5: Javascript For PHP 5 (via) “J4P5 is a JavaScript interpreter written in PHP 5, that allows to run untrusted scripts in a sandbox on your server. It aims to implement most of Ecma-262 3rd edition.”
12th July 2007, 10:24 pm
Insert in place without document.write. Very neat trick, but I’d like to see more extensive reports on browser compatibility before committing to it.
12th July 2007, 9:41 am
Return of the HTTP overhead delay. Christian proposes a neat way of improving page performance, by delaying non-essential images such as avatars until after the rest of the page has loaded.
11th July 2007, 3:12 pm
MooTools is not compatible with any other javascript framework. If you “definitely need to work with prototype” (which you don’t, since the frameworks each provide all the functionality you need to use only one or the other) then learn how to do what you want to do in prototype. Otherwise, learn to use MooTools to do all the things you want to do. They simply do not work together, and I promise they never will.
— Tom Occhino
8th July 2007, 7:29 am
jQuery Taconite Plugin. Lets you serialize jQuery DOM manipulation commands as an XML document for retrieval via Ajax.
2nd July 2007, 6:29 pm
jQuery plugin: Validation. Pretty clever way of attacking the client-side form validation problem; supports both configuration object literals and custom attributes on the form fields themselves.
30th June 2007, 10:26 pm
[...] Silverlight has full access to the browser DOM and you can make calls from Javascript into silverlight code and from Silverlight into Javascript. This means that you can already write the presentation layer of a client side web app in Javascript and implement your business logic in IronPython.
— Michael Foord
16th June 2007, 12:25 am
A JavaScript Module Pattern. I’ve been using this pattern for a few months—it works really well, though I tend to keep my own code in my own namespace rather than adding it to YAHOO.
12th June 2007, 11:30 pm
google-diff-match-patch (via) Robust algorithms to perform the operations required for synchronizing plain text, in Java, JavaScript and Python.
9th June 2007, 6:15 pm
jsjuicer. Another conditional comment respecting minifier tool, this time in C++. Ships with a command line utility, unlike JavaScript::Minifier.
4th June 2007, 5:57 pm
JavaScript Minifier that doesn’t break code (via) Perl re-implementation of Douglas Crockford’s classic JSMin that doesn’t clobber IE’s conditional comments, by Peter Michaux.
4th June 2007, 5:44 pm
Google Gears DB Abstractions. Here come the ORMs.
4th June 2007, 8:54 am
Cross Domain Frame Communication with Fragment Identifiers. Google are using this crazy iframe/fragment trick for their new Mapplets API.
31st May 2007, 2:15 pm
Apollo will include Google Gears technology. Looks like Google really worked on the partnerships for this one.
31st May 2007, 8:30 am
Dojo Offline on Google Gears. “The great news is that the Dojo crew were in the loop wrt this project, and Brad has ported Dojo Offline to use Google Gears as the base platform.”
31st May 2007, 8:28 am
RSS Bling goes Offline with Google Gears. Google Gears is Google’s new offline JavaScript framework. Dion Almaer (a Google employee) has a nice example of code using Google Gears on Ajaxian.
31st May 2007, 8:27 am
Reducing HTTP requests using make. Nice simple recipe for concatenating JavaScript in to one file using make—doesn’t do anything for cache-busting though.
27th May 2007, 11:29 pm
Packing Prototype. Why Prototype doesn’t ship with an official compressed version.
17th May 2007, 9:52 am
dojo.query: A CSS Query Engine For Dojo. I incorrectly criticised Dojo for not having a CSS node selection tool in my talk yesterday; not sure how I missed this.
17th May 2007, 9:40 am
JavaScript Libraries: The Big Picture
I just gave my first talk at XTech 2007 (I’m speaking again on Friday, on OpenID). Slides are on slideshare.net. [... 40 words]
Online and offline development with the YUI and Charles (via) Stuart Colville shows how the Charles debugging proxy can be used to serve up hosted YUI files while developing offline.
15th May 2007, 2:41 pm
Poly9 FreeEarth (via) Seriously sexy embedable 3D Flash globe, with a JavaScript API.
10th May 2007, 9:17 pm
The One True Object (Part 2). Jim Hugunin describes how the DLR let’s Python / JavaScript / Ruby talk to each other using a message passing abstraction.
5th May 2007, 1:27 am
Dynamic Language Runtime. Miguel de Icaza describes how Microsoft’s new Dynamic Language Runtime lets you call JavaScript and Visual Basic functions from Ruby. Looks like they beat Parrot to the punch.
3rd May 2007, 10:29 pm
How to debug JavaScript with Visual Web Developer Express. Microsoft’s best kept secret: a decent free debugger for Internet Explorer that doesn’t require you to install Microsoft Office.
2nd May 2007, 2:06 pm
Timing and Synchronization in JavaScript. Comprehensive overview of how browsers (Opera in particular) load scripts and queue events, with suggestions for best practices.
30th April 2007, 2:24 pm
Dojo 0.9 Update. Big changes are under way in the Dojo camp.
29th April 2007, 8:18 pm
The sliding scale. Jeremy’s write-up of my panel at the Web 2.0 Expo, with illustrative photograph.
25th April 2007, 7:09 pm
Seven JavaScript Techniques You Should Be Using Today (via) Sound advice from Dustin Diaz, who is now a Googler.
24th April 2007, 8:20 am
The website to web application gradient. Jeremy snapped this cunning illustration at my JavaScript Libraries panel at the Web 2.0 Expo.
20th April 2007, 12:30 am
Death and Taxes (via) Beautiful massive zoomable/pannable infographic of the 2008 Federal Discretionary Budget.
19th April 2007, 2:37 am
Google AJAX Feed API (via) Simple cross-domain proxy to allow JavaScript to access any publically addressable syndication feed, with the same logic as Google Reader providing normalisation.
18th April 2007, 5:29 pm
SoundManager 2. JavaScript sound API, using a bridge to Flash.
16th April 2007, 4:47 pm
Disabling keyboard controls in the Yahoo! Maps Ajax API. map.disableKeyControls() is the incantation—without it, the map will pan when you use the keyboard to scroll up and down the containing page.
11th April 2007, 1:47 pm
Microsoft saw the danger of Javascript and tried to keep it broken for as long as they could. But eventually the open source world won, by producing Javascript libraries that grew over the brokenness of Explorer the way a tree grows over barbed wire.
— Paul Graham
7th April 2007, 8:22 am
Fortify JavaScript Hijacking FUD. Bob Ippolito points out the flaws in the recent widely disseminated JavaScript Hijacking paper. While the paper does miss some important details, it’s good that more people are now aware of the security implications involved in serving JSON up wrapped in an array.
5th April 2007, 10:51 pm
Ext JS. Jack Slocum is building a business around his excellent Ext JavaScript library (which can now run on top of YUI, jQuery or Prototype). The library itself is LGPL, but you can pay for a commercial license and support.
3rd April 2007, 10:11 pm
Metaprogramming JavaScript Presentation. Adam McCrea demonstrates some incredibly elegant DSL -style JavaScript based on chaining method calls together.
26th March 2007, 7:45 pm
base2. Dean Edwards’ new JavaScript library which adds useful cross-browser features based on upcoming DOM standards (the Selectors API, DOMContentLoaded, addEventListener and more).
23rd March 2007, 5:59 pm
Rules For JavaScript Library Authors. The guiding principles behind Dean Edwards’ base2 library, entirely applicable to every JavaScript developer.
23rd March 2007, 5:53 pm
JavaScript/CSS Font Detector (via) Really clever trick: detects the fonts that you have installed by writing out some text and measuring its dimensions.
20th March 2007, 11:20 pm
DED|Chain JavaScript Library (via) Dustin’s new JavaScript library, which puts a JQuery style chained API on top of YUI.
20th March 2007, 10:36 am
A Zoned Defense. Using JavaScript’s date.getTimezoneOffset() to detect the user’s timezone and stash it in a cookie.
20th March 2007, 9:51 am
wii.js (via) A JavaScript library that lets you detect the Wii browser, and provides easy hooks for reacting to keys pressed on the Wiimote.
12th March 2007, 10:23 pm
Ajax3d Demo. Really impressive Virus clone, using the canvas element.
9th March 2007, 7 pm
Dashcode review. “Dashcode is quite possibly the best non-Firebug Javascript environment I’ve ever used.” High praise indeed.
5th March 2007, 9:06 pm
swf Image Replacement. Really neat idea: unobtrusively replace an inline image with a SWF, then apply effects like rotation, rounded corners and drop-shadowns. Shame it suffers from Flash-Of-Unstyled-Content.
27th February 2007, 7:51 pm
Serving YUI Files from Yahoo! Servers (via) If everyone who uses YUI links to the same set of files, your users will already have the YUI code cached in their browser when they arrive on your site.
23rd February 2007, 6:45 pm
John Resig: Thoughts on OpenAjax. I hadn’t looked in to OpenAjax—from John’s analysis it seems like they need to make it easier for open-source projects to participate and do a bunch of work to modernise their core library.
22nd February 2007, 10:20 pm
parseDateString function in dateparse.js return wrong date for ’2006-12-31’. I didn’t realise that you have to initialise a JavaScript Date object in a certain order; if you don’t weird bugs can result.
17th February 2007, 7:04 pm
Neighbourhood Fix-It. Report problems to your council across the UK. The most detailed Ordinance Survey maps anywhere online, and a superb example of progressive enhancement in action—the maps work without JavaScript, and the site even works without images!
17th February 2007, 5:05 pm
The Zimki Plan. Zimki is a hosted JavaScript application server by Fotango. The idea is to open source it, then build a component so developers can seamlessly switch to hosting on Fotango’s server farm if they need to handle a spike in traffic.
16th February 2007, 3:50 pm
Sumo! A Generic Microformats Parser For JavaScript. Dan Webb’s BarCamp talk on Metaprogramming JavaScript will be a must-see.
9th February 2007, 10:57 am
Live DOM Viewer (via) Neat tool from Hixie that provides an insight in to what browsers are actually thinking.
6th February 2007, 1:12 am
The window.onload problem (still). Peter Michaux offers the most comprehensive overview of this important topic to date.
5th February 2007, 8:13 pm
Fork JavaScript. A great name for Yet Another JavaScript Library. This one tries to combine the best bits from YUI and Prototype.
20th January 2007, 11:39 pm
MySpace: Too Much of a Good Thing? CSS customization really was just the result of forgetting to strip HTML. They “eventually” decided to filter out JavaScript(!)
17th January 2007, 9:09 am
jQuery 1.1. jQuery is one year old. The latest release features API improvements and some significant optimisations.
15th January 2007, 5:13 pm
The JavaScript alert(), confirm() and prompt() functions in Firefox, Opera and MSIE (but not Safari) will truncate the message after any null character. So an unsuspecting programmer who inserts user-provided text into one of these dialog boxes opens up an opportunity for the user to rewrite the bottom of the dialog box.
— Neil Fraser
13th January 2007, 12:28 pm
AJAX Debugging with Firebug. Great Firebug tutorial from creator Joe Hewitt himself. I didn’t know you could trigger profiling from your own code using console.profile() / console.profileEnd().
12th January 2007, 11:21 am
Offline Gmail and Blogger Using the Dojo Offline Toolkit. These are just mockups at the moment, but they’re a useful illustration of how offline browsing modes for Web applications could work.
10th January 2007, 12:40 pm
macrumorslive.com. The MacRumors ajax keynote coverage gets better every time—now they have live photos in addition to the text updates. Simple but effective.
9th January 2007, 5:11 pm
IE JScript Performance Recommendations Part 3. Once again, Microsoft’s official advice is to avoid closures entirely rather than learn how to use them safely. Sigh.
9th January 2007, 11:48 am
The Dojo Offline Toolkit. The Dojo Offline Toolkit will be a small, cross-platform, generic download that enables web applications to work offline.
7th January 2007, 10:24 pm
Javascript character set screw-ups (via) Some browsers treat JavaScript files as having the same content-type as the page from which they are linked. This could cause problems with UTF-8 encoded JSON; the workaround is serving up ASCII with unicode escape sequences.
21st December 2006, 3:20 pm
Why JSON isn’t just for JavaScript
Dave Winer’s discovery of JSON (and shock that “it’s not even XML”) has triggered an interesting discussion thread, on his blog and elsewhere. Plenty of people have re-assured him (and themselves) that it’s only used for JavaScript—it’s convenient in the browser but irrelevant elsewhere. [... 787 words]