Review: New Features Bring Safari 5 Up to Speed

Apple released an update to its Safari web browser Monday afternoon. We’ve been testing it for close to a full day, and we’ve found that Safari 5 performs as advertised: It’s faster, more capable and well worth the upgrade. Safari 5 was launched rather quietly at the end of the first day of the 2010 […]

Apple released an update to its Safari web browser Monday afternoon. We've been testing it for close to a full day, and we've found that Safari 5 performs as advertised: It's faster, more capable and well worth the upgrade.

Safari 5 was launched rather quietly at the end of the first day of the 2010 Worldwide Developer Conference, an event that was dominated by Steve Jobs' debut of the next iPhone and the new iOS. Safari wasn't discussed during the morning keynote, but an announcement was made later that afternoon at a web-developer session.

You can download Safari 5 on Apple's site. Both Mac OS X (Leopard or better) and Windows (XP and up) versions are available.

First up is the speed boost, which is definitely noticeable in GMail, Facebook, our WordPress admin and other sites with lots of "stuff" going on, like Huffington Post. This is thanks to Safari 5's new Nitro JavaScript engine. This is the same piece of engineering previously named SquirrelFish (we kind of wish they'd kept that name), that powers JavaScript rendering on top of Safari's WebKit engine. It gives a small bump to page-load times, but the real improvements are seen in page performance. The complex web apps we tested perform with close to zero latency, about as fast as Google Chrome, the most nimble of the major browsers.

For faster page loads, Safari 5 is implementing DNS pre-fetching. Basically, the browser looks at all the links on the page you're currently on and fetches the IP addresses of all the linked sites and page assets, preparing itself to make the jump more quickly as soon as you click on a link and begin loading another page. All of this happens in the background. Google Chrome and Firefox do this, too.

There's added support for various pieces of the HTML5 stack in Safari 5, as well as more support for CSS 3 and other technologies powering modern web apps. According to Apple's overview page, Safari 5 supports geolocation, sectioning elements, drag and drop, HTML5 form validation, Ruby, AJAX History, EventSource and WebSocket. We can't tell which version of WebSocket is being supported – typing javascript:alert('WebSocket' in window) into the URL bar just tells us "True," but nothing else.

At any rate, all of these new features are great to see, as Firefox, Chrome and Opera have supported most or all of these APIs and technologies for a while, and IE9 will support most of them. It also washes away some of the bitter aftertaste left by last week's PR mess around HTML5 support.

There's also support for full-screen playback of H.264 videos, and for subtitles – the screenshot at the top shows YouTube's H.264 player. Apple is touting this as HTML5 video support, but we'd like to point out that while H.264 does make up the bulk of online video, HTML5 doesn't require videos be H.264. All the other major browsers are backing the new, open source WebM format for video, which we've urged Apple to support as well.

One of the most talked-about new features is Safari Reader. A small gray "Reader" button now appears in the URL bar when you land on a news website or blog. Click it, and Safari strips out all of the clutter on the page (ads, widgets, sidebars, headers and footers) and presents just the text in a large typeface, cleanly formatted in a white window that floats, lightbox-style, over a darkened page. It also strings multipage articles together in the same window automatically. It's intriguing to speculate about how Reader, if widely adopted, will change website-design principles by encouraging cleaner, more readable layouts. Scott Gilbertson explores this idea in detail in his in-depth look at Safari Reader here on Webmonkey.

There's also an extensions manager in Safari 5. Here, Apple is taking a page from the books of Chrome Extensions and Mozilla Jetpack by offering developers a lightweight browser-extension framework that runs add-ons written in HTML, JavaScript and CSS. This makes it much easier for developers to get started writing extensions, and it makes it easier for authors to port an extension from one browser to another. It limits what the extension can do to mostly manipulating DOM events or the browser UI, but that should be enough for almost any goal. Safari 5 extensions are sandboxed, too. You know, to protect the kids.

There's an application form you have to fill out if you want to make and distribute Safari extensions. Go to the Safari Developer Program site and enroll for free. Apple will give you a certificate that must be used to sign your extensions.

You can distribute your extensions however you want, but they must be signed. This is to assure users that when they download an extension or receive an update notification, they're downloading a package from a certified Apple developer and not some nefarious prankster.

A couple of sticking points.

First, the URL bar in Safari 5 is smarter – it does full-text searches of page titles and URLs in your history and bookmarks now – but it's not smart enough. Other browsers have moved to a unified URL bar that serves as a location bar and a web search input field, and anything else just feels confusing at this point. Hopefully, somebody will write an extension to fix this. Until then, we have to do our web searches in the dedicated search field off to the right, which now includes Bing as a preset choice along with Google and Yahoo.

Second, the status bar (as always with Safari) is invisible by default. You have to manually turn it on under the View menu. I've always argued against this practice. A browser that doesn't supply a visual link destination for each and every click is an insecure browser. I just don't trust those bullies out there on the web, and neither should you.

See Also: