Say Hello to JavaScript’s Native getElementsByClassName

With the recent release of Firefox 3, we’ve now got a full fledged, mainstream browser that supports the long-awaited, often replicated, getElementsByClassName method. This is good news as we’ll all be just that much speedier as we ditch the various helper functions and go right into the browser for that functionality.

The thing is, the transition, when we’ll finally be able to make it, isn’t a one to one swap. In fact, depending on what you’re using it for you could run into problems transitioning from a helper function to the native method.
Continue reading “Say Hello to JavaScript’s Native getElementsByClassName”

Best Lightweight Web Server for Serving Static Content?

Dear Internet, anyone out there have any experience with lightweight web servers that they’d like to share?

We’re (meaning Cramah!) looking to set up an asset server to serve static assets like css, javascript, images, flash (destined for progressive downloads) and mp3s. We want to offload that kind of stuff from app servers as a general architecture approach going forward (my obsession with performance is spreading 🙂 ) Since it’s (at some level) my baby and is something I’m generally interested in, I’ve taken a little time and starting looking into what the set-up should entail. I’ve done a little bit of research and it looks like the names I already know are the names that people are using:

Based on what I knew when I started, what I’ve read since, and a recommendation from a co-worker, lighttpd seems to be the way to go. Thing is, I don’t want to jump into anything before asking you, the Internet, if there’s anything I should know about it (or the other two) before heading down that path.

So… anyone out there using this stuff and feel like sharing an anecdote or two? Is there some other candidate I’m missing?

All comments are welcome 🙂

Using overflow:auto to Clear Floated Content in CSS

For a long time, I used something like <div style="clear:both"></div> or its class equivalent to clear floated content in layouts. I knew, at some level, there were better solutions, but as these things go– I had deadlines to meet, had a working solution and there was never any inducement to look for a new one. Sure, there was a little extra markup, but it was so limited I could live with it.
Continue reading “Using overflow:auto to Clear Floated Content in CSS”

Yahoo! Posts an Interesting Illustration of the Lang Attribute.

In the post announcing that Yahoo! search results now has natural language support, the YDN blog offers up two audio samples that illustrate a screen reader reading mixed language text with and without the lang attribute. As you can plainly hear, the lang="fr" attribute makes a great difference in the performance of the screen reader when handling mixed language text.

As they point out, the attribute also allows search engines to more easily parse stop words, so there’s an SEO benefit as well.

The lesson here? Polyglots unite! In using the lang attribute.

(Now I run off to add it myself to all the French,Italian, etc. phrases I’ve got littered around the site.)

Acid3 Test Released. I Took Some Screen Captures. Lots of Fail.

Screen Shots

These were done with browsercam, so the test may or may not have fully run its course by the time the 15 second delay was up. Still, it’s not like any of these browsers were close, so a few seconds isn’t going to save them if, in fact, they were cut off before the rendering was over.

As a note, I tried to do the Capture in Konqueror and it pretty much made Browsercam cry and/or vomit (“Do NOT Try The Capture Again!”) I’m going to log in shortly to see what the actual damage is.

[update]It’s a known bug and some commentors were gracious enough to take screen shots with updated versions.[/update]

Reference Rendering:

reference-rendering.png

And now the Fail parade:
Continue reading “Acid3 Test Released. I Took Some Screen Captures. Lots of Fail.”