News Roundup: Data URIs, Knockout, Mobile Browsers
Are people taking summer vacations out there, or what? It’s been a bit of a slow news week on the Javascript front, but don’t worry, we’ve got plenty of great stuff to keep you busy.
Data URIs make CSS sprites obsolete
The always prolific Nicholas Zakas has a great post up on his blog titled Data URIs make CSS sprites obsolete. The main argument he makes goes like this: We want to reduce the number of HTTP requests we make, so we put all (or at least a lot) of our background images together in on image file (a technique known as “spriting”). However, CSS sprites are a pain to work with. What we need is a way to cut down on HTTP requests without having to perform the CSS positioning acrobatics normally required with CSS sprites. Zakas’s solution is to use data URIs to put the image data directly in your stylesheets. It makes the CSS significantly larger, but that will cause less of a performance hit than issuing the additional HTTP requests for the sprited images.
Unfortunately, data URIs aren’t supported in IE < 8, so you’ll still need to fall back to sprites if you need to support IE 6 & 7. Still, Zakas’s solution is a great one, especially if you use his CSSEmbed tool, which automatically creates the data URIs and puts them in your CSS for you. Make it part of your build process, and you’re good to go!
Knockout
Knockoutis a new framework for connecting your HTML views to your model data. Primarily, it observes some data object, and when that object changes, it will update the corresponding view with the new data. Additionally, it has its own templating capabilities. The framework’s author, Steven Sanderson compares Knockout usage to the patterns you’d employ in Silverlight, so its something that .Net developers might want to check out.
Mobile Browser Cache Limits
Figuring out just how much data can be stored in mobile browser caches and under what circumstances those caches persist. A new post on the YUI blog features a ton of new research into the current state of these limits. Rather than summarizing their results, I suggest reading (and bookmarking!) the article. The data are indispensible.
Dion & Ben step down as Ajaxian editors
Lastly, as you probably all know already, Dion Almaer and Ben Galbraith have stepped down as editors of Ajaxian. The site will continue, and Dion & Ben will continue to contribute occasionally, but they’re handing the editorial reins over to TechTarget, the company that actually owns the Ajaxian.com domain. Ajaxian has done a ton of good for us Javascripters during Dion’s & Ben’s tenure, so I want to personally extend my thanks to them.












