Category Archive for 'Javascript'

IE9 May Raise the Bar

Tuesday, March 16th, 2010

Wow.

IE9 is coming, and it looks like it’ll get Microsoft back in the game. Full Developer Guide.
The Good: New standards supported, hardware-accelerated canvas, SVG, Javascript speed on par with the other browsers, preview installs side-by-side with IE.
The Bad: Not available on XP and no guarantee it will be. XP users will be [...]

Javascript files don’t auto-update

Friday, August 28th, 2009

On a panel of 4 Javascript library developers at Ajax Experience 2008, a question came up about how their libraries use browser detection. When John Resig suggested that libraries should strive for full feature detection (hardly used at all at the time) instead of browser/object detection, the other developers reacted like he was crazy. They [...]

The Quickening of Facebook

Friday, July 31st, 2009

If you’ve used Facebook in Opera and Firefox, you might have noticed that Facebook is several magnitudes faster in FF, but this has nothing to do with FF’s speed. For FF and IE users, Facebook uses a client-side architecture called “Quickening” that basically makes a few popular pages into full AJAX applications that stay loaded [...]

Where’s the code?

Monday, October 13th, 2008

Google’s free open source project hosting has been awesome for Minify, so when I was looking around for Subversion hosting for my personal code, I figured why not host it there? So here’s a bunch of my PHP and Javascript code. Hopefully some of it will be useful to people. A few PHP highlights:

HashUtils implements [...]

Minify 2.1 on mrclay.org

Friday, September 19th, 2008

A new release of Minify is finally out, and among several new features is the “min” application that makes 2.1 a snap to integrate into most sites. This post walks through the installation of Minify 2.1 on this site.

Javascript humor

Wednesday, September 10th, 2008

hasthelargehadroncolliderdestroyedtheworldyet.com has a news feed. It also has this in the source:
if (!(typeof worldHasEnded == “undefined”)) {
document.write(“YUP.”);
} else {
document.write(“NOPE.”);
}
Folks without Javascript get a more definite answer:
<noscript>NOPE.</noscript>
Also appreciated:
<!– if the lhc actually destroys the earth & this page isn’t
yet updated please email mike@frantic.org to receive a full
refund –>

Case of the NS_ERROR_DOM_SECURITY_ERR

Saturday, September 6th, 2008

Working on a bookmarklet, I ran across “security errors” in Firefox and Opera (may happen in others, I didn’t check). In Firefox the code threw “Security error (NS_ERROR_DOM_SECURITY_ERR)” and in Opera it was something similarly vague.
The culprit code was trying to access the cssRules property of a style sheet from a different domain (my CSS [...]

Minifying Javascript and CSS on mrclay.org

Thursday, March 27th, 2008

Update: Please read the new version of this article. It covers Minify 2.1, which is much easier to use.
Minify v2 is coming along, but it’s time to start getting some real-world testing, so last night I started serving this site’s Javascript and CSS (at least the 6 files in my WordPress templates) via a [...]

Thoughts on a Javascript “validator”

Monday, July 16th, 2007

(X)HTML and CSS have their own validators, but we need one for Javascript as well. JSLint could be part of it, but what I’m imagining would flag the use of “native” objects/interfaces not defined by W3C or ECMA standards. E.g., document.layers or window.ActiveXObject.
The hard part in doing this is finding a full Javascript interpreter with [...]

Hacking a 3rd party script for bookmarklet fun

Wednesday, June 27th, 2007

A few weeks ago I created a simple bookmarklet that loads del.icio.us’s PlayTagger script into the current page. This post covers how some problems with this script were worked through.
Too late
The first challenge was that PlayTagger was designed to initialize itself (let’s call this method “init“) on window.onload: If a user fired the bookmarklet after [...]