Archive for the 'JavaScript' Category

Rendering: repaint, reflow/relayout, restyle

Dec 17th, 2009

2010 update: Lo, the Web Performance Advent Calendar hath moved Dec 17 This post is part of the 2009 performance advent calendar experiment. Stay tuned for the articles to come. UPDATE: Ukraine translation here. Nice 5 “R” words in the title, eh? Let’s talk about rendering – a phase that comes in the Life of […]


JavaScript loading strategies

Dec 15th, 2009

2010 update: Lo, the Web Performance Advent Calendar hath moved Dec 15 This article is part of the 2009 performance advent calendar experiment. Today’s article is a contribution from Ara Pehlivanian, author of two JavaScript books. Please welcome Ara and stay tuned for the articles to come. Ara Pehlivanian has been working on the Web […]


Reducing the payload: compression, minification, 204s

Dec 11th, 2009

2010 update: Lo, the Web Performance Advent Calendar hath moved Dec 11 This post is part of the 2009 performance advent calendar experiment. Stay tuned for the next articles. After removing all the extra HTTP requests you possibly can from your waterfall, it’s time to make sure that those that are left are as small […]


Duplicates and near-duplicates

Dec 9th, 2009

2010 update: Lo, the Web Performance Advent Calendar hath moved Dec 9 This post is part of the 2009 performance advent calendar experiment. Stay tuned for the next articles. One of Yahoo!’s first batch of performance best practices has always been “Avoid duplicate scripts” (check Steve Souders’ post). Later we added “… and styles”. This […]


Reducing the number of page components

Dec 5th, 2009

2010 update: Lo, the Web Performance Advent Calendar hath moved Dec 5 This is the fifth in the series of performance articles as part of my 2009 performance advent calendar experiment. Stay tuned for the next articles. Let’s talk a but about waterfall optimization – the first thing that happens in Mr.Page’s life. The best […]


Statsy – more data points for markup quality

Nov 30th, 2009

In the spirit of the content-to-markup ratio bookmarklet, here’s another one that gives you some more data points to help you judge the quality of a page’s markup and help answer the old question – where does all this page weight go. Install the statsy bookmarklet Drag this link to your bookmarks: statsy the results […]


Browser’s implied globals

Oct 20th, 2009

Like it’s not bad enough that JavaScript has implied globals (forget var and you create a global), but the browsers have decided it’s a good idea to add more pollution to the global namespace. This has been a source of frustration before with IE, it’s really hard to understand the logic behind it, but it’s […]



Sep 23rd, 2009

cssmin.js is a JavaScript port of YUICompressor’s CSS minifier. The motivation Minifying CSS helps reduce file sizes and makes your pages faster and your users happier. YUICompressor is cool but is written in Java, which can be a blocker for some folks – you know JVM, command line, classpaths… No more excuses, now you have […]


JavaScript shell scripting

Sep 3rd, 2009

As you probably know, JavaScript is not limited to the browser. There’s server-side JavaScript, JS for various extensions, you can script Photoshop operations with JavaScript if you feel like it. Or compile Windows executables. You see where I’m going with this. JavaScript is everywhere 🙂 And yes, you can do shell scripting in JavaScript. On […]


The art and craft of postload preloads

Aug 27th, 2009

What can your tired old page, once loaded and used and read, can do for your user? It can preload components needed by the next page, so when the users visit the next page, they have the new scripts, styles and images already in the cache. Next page loads faster and the user’s happy. On […]


Slides from JSConf

Apr 28th, 2009

I’m back from the most excellent JSConf (JavaScript Conference) in Washington D.C. I’m tired and need sleep but the conference was, hands down, the best conference I’ve ever attended. It was all about the community, it was inexpensive, with parties all around, both speakers and attendees were treated exceptionally well, in fact there wasn’t a […]


Relative to absolute links with JavaScript

Mar 17th, 2009

I was toying with a completely different thing and specifically a Yahoo service that gives you the ability to use HTML as data and then lets you use xpath to query this data. I came up with a somewhat interesting idea (will post tomorrow, too late now), but all of a sudden I realized I […]


FireEagle and geo-location fun

Mar 12th, 2009

FireEagle is a newer service from Yahoo, it’s an API and service that stores your geo-location and lets other application read or update it. With your permission, of course. Now there’s a FireEagle Firefox extension, still marked experimental in so you need a free AMO account in order to download it. Once you install […]


Content-to-markup ratio bookmarklet

Mar 5th, 2009

When you care about performance, or SEO (or just doing a good job as web dev) an interesting data point is the ratio of page content vs. the markup used to present this content. Or… how much crap we put in HTML in order to present what the users want to see – the content. […]


Replace the Home button with a script

Mar 3rd, 2009

Robert Ames commented on my previous post suggesting replacing the Home button with my little site search bookmarklet. I didn’t even know this was possible, but I found it pretty cool, so I just had to try. x-browser I tried this in Firefox/Mac and IE/Windows and it works just fine. ok, what is it? Well, […]


Search site bookmarklet with YUI and BOSS

Feb 21st, 2009

Ever wanted to search only the web site you’re currently on? Not the page, but the whole site. And only this site, not the rest of the web. This bookmarklet does just that. Install Right-click this link and add to your bookmarks/favorites. Or just drag to your bookmarks toolbar. search site Or if you don’t […]


JSLint on Mac + TextMate integration

Feb 21st, 2009

UPDATE: Ryan Grove has a better script to display the JSLint results. So basically follow the instructions here until you get to Step 2, point 5 (where you write the command to run JSLint). Then head over to Ryan’s blog post to get the better script. JSLint is an indispensable tool if you’re serious about […]


Installing Rhino on Mac

Feb 20th, 2009

To quote Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically embedded into Java applications to provide scripting to end users. Rhino allows you to use JavaScript: on the server-side, so you can ditch RoR, Perl, PH… well, keep PHP 🙂 … in favor of JavaScript on the command […]


>>> $$(selector)

Jan 30th, 2009

Gotta love the Firebug console, how can anyone not love the Firebug console. It makes testing random pieces of JavaScript a breeze and best of all – you’re playing with the live page. Your page or any page for that matter. Two nice shortcuts you can use in the console are $ and $$. The […] update

Oct 26th, 2008

What’s new in The old domain now redirects to the new one, which is what we originally intended but the domain registration took a while and we quickly got just in time for the Ajax Experience announcement of the tool There’s a bookmarklet version of the Firefox extension so you can […]


Short Amazon affiliate links – a bookmarklet

Oct 19th, 2008

It’s a pain to link to a specific product on Amazon if you have to use their UI to build an affiliate link. It’s good to have nice, clean and short affiliate links. This post gives you the details and also a bookmarklet to built the links by visiting the product page you want to […]


Javascript console in IE

Oct 18th, 2008

I’m a sucker for consoles. The ability to quickly type some code and see it executed right then and there… priceless. That’s why I’m a huge fan of Firebug’s JavaScript console. But what about IE? option 1 – Firebug lite Firebug lite is a lighter version of the proper Firebug which runs in browsers other […]


JavaScript’s class-less objects

Oct 16th, 2008

“JavaScript’s class-less objects” article up at the JavaRanch’s newsletter. Update: and mentioned on Ajaxian, sweet.


OOJS book free chapter 8 on YUIblog

Sep 26th, 2008

Chapter 8 of the Object-Oriented JavaScript is available at the Enjoy! Chapter 2 is also available at the publisher’s site. Probably thanks to YUIBlog, the book was #7#6 in the JavaScript category on Amazon today, not bad. It’s the highest I’ve seen it, not that I’m obsessed with checking sales rank. It’s the journey, […]



Jul 26th, 2008

location = location … and 534 other ways to reload the page with JavaScript How many ways you can think of when you want to reload the current page with JavaScript? I counted 535 before I got bored, maybe someone can pick up from there? The cases are so much that I had to write […]