Simon Willison’s Weblog

Subscribe
Atom feed for javascript

707 posts tagged “javascript”

2009

Coupling asynchronous scripts. More from Steve Souders, this time discussing methods to cause externally loaded scripts to execute in the correct order, obeying dependencies. Surprisingly there’s no mention of YUI loader or the Dojo packaging system.

# 30th April 2009, 7:57 pm / steve-souders, dojo, yui, javascript, loading

Loading Scripts Without Blocking. Steve Souders is publishing extracts from his new book, “Even Faster Web Sites”. Here’s a systematic study of different JavaScript loading methods, along with a decision tree for picking the most appropriate one for your application.

# 30th April 2009, 7:56 pm / javascript, steve-souders, performance, blocking, loading

Building a Better JavaScript Profiler with WebKit. Clever hack from Francisco Tolmasky which solves the problem of JavaScript profilers showing ? as the name of any anonymous functions. He patched the WebKit profiler to look for a displayName attribute on a function and show that as the function name instead.

# 29th April 2009, 11:57 pm / webkit, profiling, javascript, francisco-tolmasky

With YQL Execute, the Internet becomes your database. This is nuts (in a good way). Yahoo!’s intriguing universal SQL-style XML/JSONP web service interface now supports JavaScript as a kind of stored procedure language, meaning you can use JavaScript and E4X to screen-scrape web pages, then query the results with YQL.

# 29th April 2009, 10:50 pm / yql, yahoo, apis, sql, javascript, xml, jsonp, json, e4x

And Now For Something Entire... Oooh! Shiny! Alex Russell on O3D, the new 3D browser plugin from Google that makes OpenGL accessible to JavaScript (and embeds V8 so performance won’t suck even on slower browsers).

# 22nd April 2009, 12:19 pm / google, javascript, alex-russell, 3d, o3d, v8, opengl

Running Rhino and Helma NG on Google App Engine. Helma NG is a JavaScript web app framework, which now works on App Engine out of the box.

# 12th April 2009, 12:52 pm / appengine, helmang, helma, javascript, google, rhino

Browsing my browsing. Roo Reynolds used the MeeTimer Firefox extension to gather statistics on his browsing habits, then extracted data directly from the SQLite database and generated his own graphs using PHP and the canvas element.

# 10th April 2009, 8:48 am / canvas, javascript, rooreynolds, sqlite, php, meetimer, firefox

Protovis. JavaScript graphing library based on canvas, with an elegant chaining style API.

# 10th April 2009, 8:43 am / protovis, visualisation, graphs, canvas, javascript

cufon. A promising alternative to sIFR, cufon uses VML on IE and canvas on other browsers to render custom fonts in the browser. You have to convert your font to JavaScript first, either using their free hosted tool or by installing the FontForge based server-side script yourself. The JavaScript encoded font file uses VML primitives to improve IE performance; the JavaScript library converts that to canvas calls for other, faster browsers.

# 6th April 2009, 10:29 pm / cufon, browsers, fonts, vml, ie, fontforge, sifr, typography, canvas, javascript

Ext Core 3.0 Beta Released. The Ext JavaScript team have just released the core library (similar to jQuery or Prototype) under an MIT license. The rich GUI elements that go on top are still under the GPL.

# 5th April 2009, 8:17 pm / mit, extjs, javascript, extcore, gpl, licensing, open-source

Dojo 1.3 now available. Looks like an excellent release. dojo.create is particularly nice—I’d be interested to know why something similar has never shipped with jQuery (presumably there’s a reason) as it feels a lot more elegant than gluing together an HTML-style string. Also interesting: you can swap between Dojo’s Acme selector engine and John Resig’s sizzle.

# 1st April 2009, 12:19 am / dojo, jquery, javascript, dojocreate, releases, acme, sizzle, selectors

Special Events in jQuery. How to add a custom “tripleclick” event to jQuery, using the jQuery.event.special extension hook.

# 30th March 2009, 10:15 am / jquery, javascript, events, brandon-aaron

Building Fast Client-side Searches. Flickr now lazily loads your entire contact list in to memory for auto-completion. Extensive benchmarking found that a control character delimited string was the fastest option for shipping thousands of contacts around as quickly as possible.

# 19th March 2009, 3:35 pm / flickr, javascript, autocomplete, ajax, json

A few notes on the Guardian Open Platform

This morning we launched the Guardian Open Platform at a well attended event in our new offices in Kings Place. This is one of the main projects I’ve been helping out with since joining the Guardian last year, and it’s fantastic to finally have it out in the open.

[... 839 words]

Combine JSONP and jQuery to quickly build powerful mashups. jQuery’s JSONP support is one of my favourite little-known features of the library.

# 3rd March 2009, 3:17 pm / jquery, json, jsonp, javascript

jQuery Sparklines. Delightful Sparklines implementation, using canvas or VML in IE. A neat nod towards unobtrusiveness as well: you can specify your data as comma separated values inside a span, then use a single jQuery method call to convert the span in to a sparkline image.

# 27th February 2009, 8:43 pm / gareth-watts, graphs, canvas, javascript, jquery, sparklines, vml

Magic properties make Firefox synchronously load the Java plugin. Even defining a function called sun() (or several other symbols) will trigger the Java VM to be loaded, dramatically hurting the performance of your page.

# 27th February 2009, 4:03 pm / firefox, java, performance, javascript, mark-pilgrim

The Cost of Accessibility. Drew McLellan comments on the seemingly inevitable march towards JavaScript dependent applications, and argues that JavaScript frameworks such as Cappuccino have a duty to integrate accessibility in to their core.

# 25th February 2009, 10:31 pm / drew-mclellan, accessibility, cappuccino, javascript

Oscars 2009: the interactive results | guardian.co.uk. My latest project for the Guardian, put together on very short notice. Updates live as the results are announced, and allows Twitter users to vote on their favourite for each category by sending a specially formatted message to @guardianfilm—jQuery and Ajax polling against S3 under the hood.

# 23rd February 2009, 2:19 am / twitter, projects, guardian, oscars, javascript, jquery, s3

I think you overstate the usefulness of the [jQuery Rules] plugin. Using this plugin, users are now limited by what selectors that can use (they can only use what the browsers provide - and are at the mercy of the cross-browser bugs that are there) which is a huge problem. Not to mention that it encourages the un-separation of markup/css/js.

John Resig

# 22nd February 2009, 11:11 pm / john-resig, jquery, javascript, css, selectors, jqueryrules, plugins

jQuery.Rule (via) jQuery plugin for manipulating stylesheet rules. For me, this is the single most important piece of functionality currently missing from the core jQuery API. The ability to add new CSS rules makes an excellent complement to the .live() method added in jQuery 1.3.

# 22nd February 2009, 5:53 pm / jquery, plugins, css, javascript, arielflesler

jQuery 1.3.2 release notes. Not just a bug fix—there are a number of subtle behaviour changes, including to the :visible/:hidden selectors and the appendTo/prependTo/*To family of methods. I strongly recommend testing and reviewing those changes before upgrading.

# 21st February 2009, 4:42 pm / jquery, javascript

Twitter Don’t Click Exploit. Someone ran a successful ClickJacking exploit against Twitter users, using a transparent iframe holding the Twitter homepage with a status message fed in by a query string parameter. Thiss will definitely help raise awareness of ClickJacking! Twitter has now added framebusting JavaScript to prevent the exploit.

# 12th February 2009, 7:56 pm / framebusting, javascript, security, clickjacking, twitter, chris-shiflett

Ehy IE8, I Can Has Some Clickjacking Protection? (via) IE8 has built-in protection against clickjacking, but it’s opt-in (with a custom HTTP header) and IE only. It turns out the usual defence against clickjacking (using framebusting JavaScript) doesn’t work in IE as it can be worked around with a security=“restricted” attribute on an iframe.

# 29th January 2009, 1:39 pm / clickjacking, ie, ie8, http, security, javascript, iframes

OCR and Neural Nets in JavaScript. John dissects the brilliant Greasemonkey script that solves simple captchas using the canvas element and HTML5’s getImageData API.

# 25th January 2009, 12 am / getimagedata, captcha, ocr, javascript, greasemonkey, canvas, john-resig

google-mobwrite. Neil Fraser’s terrifyingly clever differential synchronization algorithm (for SubEthaEdit-style collaboration over the web) is now available as an open source Python and JavaScript library.

# 24th January 2009, 11:55 pm / mobwrite, google, open-source, python, javascript, collaboration, subethaedit, neil-fraser

AJAX APIs Playground. Ferociously useful collection of executable and editable example code for all(?) of Google’s JavaScript APIs, including Google Maps and the increasingly interesting Visualization API.

# 22nd January 2009, 6:38 pm / google, javascript, ajax, google-maps, googlevisualization

jQuery 1.3.1 Released. Bug fix for 1.3, mainly browser compatibility issues. Of interest: jQuery no longer ship a packed version (where JS is used to further decompress a string), as their tests show that this reduces performance due to the overhead of the extra decompression. They still provide a YUI Compressor minified version.

# 22nd January 2009, 10:41 am / minification, jquery, javascript, performance

jQuery 1.3 and the jQuery Foundation. The IP for jQuery and jQuery UI now rests with the Software Freedom Conservancy (a smart alternative to setting up a brand new foundation), while Sizzle is a separate project looked after by the Dojo Foundation.

# 14th January 2009, 5:59 pm / jquery, javascript, jqueryui, sizzle, dojofoundation, software-freedom-conservancy