Preload, then execute

Oct 23rd, 2010

I talked before about using an object element to load scripts and styles without executing/applying them to the current document. And this is nice for preloading assets – faster and less error-prone than simple inclusion if the document or iframe. But what about preloading assets (scripts) and then executing them on the current page? Turns […]

 

JavaScript JS Array Documentation (#jsonf, #promotejs)

Sep 26th, 2010

Join me in the initiative to promote proper JavaScript documentation from MDC. It’s embarrassing the quality of links that pop up in search engines when searching JavaScript general questions. Let’s help connect newcomers to JavaScript with better reading. PromoteJS.com will give you a unique code.

 

Preload CSS/JavaScript without execution

Apr 21st, 2010

Preloading components in advance is good for performance. There are several ways to do it. But even the cleanest solution (open up an iframe and go crazy there) comes at a price – the price of the iframe and the price of parsing and executing the preloaded CSS and JavaScript. There’s also a relatively high […]

 

Publishing 5 books this year

Apr 1st, 2010

So I’ll be publishing 5 books this year. Isn’t that incredible? Is it even possible? And good quality books at that? It’s a nice challenge (my last year’s challenge failed, I didn’t even bother to count how bad it failed). I think it’s possible, especially if you bend a little bit the meaning of “5”, […]

 

One-click Minifier Gadget (OMG) – initial checkin

Jan 31st, 2010

So I’ve been thinking and talking to folks about this idea of having one-stop shop for all your minification needs. Minification of JS and CSS as well as image optimization helps site performance by reducing download sizes. This is good. But not a lot of people do it. People don’t do it, because it’s a […]

 

Extreme JavaScript optimization

Dec 20th, 2009

2010 update: Lo, the Web Performance Advent Calendar hath moved Dec 20 This article is part of the 2009 performance advent calendar experiment. Today’s article is a second contribution from Ara Pehlivanian (here’s the first). There’s a Belorussian translation provided by Patricia. Thanks! Ara Pehlivanian has been working on the Web since 1997. He’s been […]

 

The new game show: “Will it reflow?”

Dec 19th, 2009

2010 update: Lo, the Web Performance Advent Calendar hath moved Dec 19 This post is part of the 2009 performance advent calendar experiment. Stay tuned for the articles to come. Intrigued by Luke Smith’s comment and also Alois Reitbauer’s comment on the previous post about rendering I did some more testing with dynaTrace and SpeedTracer. […]

 

DOM access optimization

Dec 18th, 2009

2010 update: Lo, the Web Performance Advent Calendar hath moved Dec 18 This post is part of the 2009 performance advent calendar experiment. Stay tuned for the articles to come. This blog series has sailed from the shores of networking, passed down waterfalls and reflows, and arrived in ECMAScriptland. Now, turns out there’s one bridge […]

 

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 […]

 

Performance tools

Dec 2nd, 2009

2010 update: Lo, the Web Performance Advent Calendar hath moved Dec 2 This is the second in the series of performance articles as part of my 2009 performance advent calendar experiment. Stay tuned for the next articles. While theoretically you can speed up your site by just blindly following advice from this blog and other […]

 

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 […]

 

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 […]

 

Book things

May 12th, 2009

In the spirit of tooting one’s own horn…. Top 3 This morning I noticed my OOJS book is #3 in Amazon’s JavaScript category, wo-hoo! Then it dropped down but in the evening it’s up again. Nice company – OOJS, Doug Crockford’s book and David Flanagan’s giant Rhino JS book. Not that I’m obsessed with my […]

 

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 […]

 

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 http://www.mozilla.org/rhino/: 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 […]

 

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 YUIblog.com. 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, […]