In this post I’m going to share some tips to increase a site’s usability that are very quick to implement. Not all of them are cross-browser, but they are the icing on the cake anyway, nobody would mind without them.
If you are following the current news on web development, you probably heard that the new Safari 4 has a great feature: It natively allows the user to select multiple files via a single input control, if you specify a value for the attribute
<input type="file" multiple>
or, in XHTML:
<input type="file" multiple="multiple" />
You might not know that Opera supported multiple file uploads for a while now, based on the earlier Web Forms 2.0 standard in a slightly different (and more flexible) format:
<input type="file" min="1" max="9999″ />
I used to take pride in my short, bulletproof and elegant String and Number type checks:
// Check whether obj is a Number obj + 0 === obj // Check whether obj is a String obj + '' === obj
I always thought that apart from being short and elegant, they should be faster.
However, some quick tests gave me a cold slap in the face and proved my assertion to be entirely false.
UPDATE: New version
First of all, happy Valentine’s day for yersterday. 🙂 This is the second part of my “Using CSS3 today” series. This article discusses current RGBA browser support and ways to use RGBA backgrounds in non-supporting browsers. Bonus gift: A PHP script of mine that creates fallback 1-pixel images on the fly that allow you to easily utilize RGBA backgrounds in any browser that can support png transparency. In addition, the images created are forced to be cached by the client and they are saved on the server’s hard drive for higher performance.