About Nicholas C. Zakas

Recent Posts

History of the user-agent string

A couple of weeks ago, I talked about feature detection and browser detection. That post featured a little bit about user-agent sniffing and the comments continued the trend. I maintain that user-agent sniffing is an important technique to keep in your back pocket for those rare occasions when it’s needed. Before being able to do... […]

Interviewing the front-end engineer

Interviewing a front-end engineer is an interesting task primarily because most are self-taught. Startups and large companies alike have equal trouble finding quality front-end engineers simply because they don’t know what to look for and which questions to ask. Having been around the industry for a while, I’ve developed my own methods for interviewing front-end... […]

Feature detection is not browser detection

Browser detection has been a hot-button topic in web development for a long time. This battle pre-dates JavaScript browser detection by a couple of years and begins with the introduction of Netscape Navigator, the first truly popular and widely-used web browser. Netscape Navigator 2.0 was so far beyond any of the other available web browsers... […]

Protect IE from empty img src

In a previous post, I discussed the problem with setting an HTML image’s src attribute to an empty string. In Internet Explorer, Safari, and Chrome, this results in a second request being made to the server (Firefox 3.5 patched this behavior and Opera doesn’t exhibit the behavior). My post also showed a couple of ways... […]

Writing maintainable code

Three years ago, I gave my first talk at Yahoo! entitled, Maintainable JavaScript (slides). The point of the talk was to encourage people to use more rigor in their JavaScript coding. A lot of people who write JavaScript for a living began as hobbyists and hackers, including myself. All of the best front end engineers... […]

Computer science in JavaScript: Base64 encoding

Not too long ago, I wrote about data URIs and released a couple of tools to help generate them. A key part of the data URI equation is base64 encoding. Base64 encoding is described in RFC 3548, along with base16 and base 32 encodings, all of which are ways to represent single-byte data with a... […]

Empty image src can destroy your site

This is a problem I’ve come across frequently, and since it has come up again recently, I thought I’d explore this issue in the hope that it will save others some trouble. There are so many problems that this one issue can lead to that it’s baffling browsers still behave this way. The issue? An... […]

What makes a good browser API?

Last month, I attended another discussion at Mozilla, this one about the future of web databases. Though the content of the discussion was interesting, I found a rather general debate much more so. There ended up being two schools of thought related to native browser APIs for JavaScript. One camp firmly believes that native JavaScript... […]

The curious case of JavaScript unit testing

JavaScript unit testing, and front-end testing in general, is a fascinating topic to me. Coming from a job where I developed in Visual Basic.NET and used nUnit for testing, I instantly fell in love with unit testing. Not too long ago I created the YUI Test JavaScript testing framework (for YUI 2.x and YUI 3.x)... […]

Introduction to web accessibility

One topic that is close to my heart is web accessibility. It’s not something that I’ve written or spoken about in the past, and so I thought it was time to get the ball rolling. At Yahoo!, we’re fortunate to have a great number of people who are not only aware of accessibility issues but... […]