Test Center: Safari 4 preview
Apple's new beta of Safari for Mac OS X and Windows is fast, beautiful, tuned to the latest Web standards, and finally even with the remarkable WebKit project
Follow @infoworldYou already know Safari. It's the only browser that ships with OS X, in the same manner that Internet Explorer is the de facto browser for Windows. Safari rose to greater recognition as the iPhone's touchy-feely Web 2.0 client. You might be aware that OS X and Windows editions of Safari are released in parity, function identically, and are updated automatically through Apple Software Update in response to security and stability issues.
You likely also know that Safari is implemented using WebKit, an open source framework for embedded HTML clients. It's at that point that the relationship between Safari and WebKit becomes hazy. The common belief is that Safari is effectively a front-end wrapper for WebKit.
[ Safari is ahead of the curve in speed, standards, and good looks, but not in security -- find out why in the Test Center guide to browser security. ]
I'll set that record straight. The default browser on all of my Macs is named WebKit.app. There is another program in the Applications folder named Safari.app. When I launch WebKit.app, the menu bar shows the name "Safari." WebKit is Safari, plus everything the independent WebKit project folds into its nightly builds. Those builds are released as source and as Windows and OS X executables that users are not warned away from, but encouraged to use.
Safari is WebKit frozen at a stable release, validated, supported (except for betas), and documented by Apple. That's essential added value given that WebKit joins Core Data, Core Animation, and other Apple frameworks that provide developers with one way, a right way, to incorporate any application feature. The safe, supported WebKit and its vastly accelerated JavaScript interpreter will move developers to shift more applications to the Web. Steve Jobs spoke of this at the iPhone announcement. He just spoke too soon.
Racing JavaScript
A key feature -- if not the key feature -- in Safari 4 beta, is the SquirrelFish/Nitro JavaScript interpreter. WebKit calls its boosted JavaScript SquirrelFish, not exactly glossy brochure material. Apple renamed it Nitro Engine. JavaScript is the "j" in "AJAX," so is responsible for first page draw latency. To do the fastest browser takes the fastest JavaScript, but also quick server communication.
Apple's "fastest browser" boast is proved by SunSpider JavaScript Benchmark tests against Firefox 3.0.5, both running on OS X Leopard 10.5.6. The SunSpider JavaScript Benchmark suite is freely available online, where you can test any browser you like. Note that the benchmark resides on WebKit's site. Mozilla and Microsoft should challenge the results if they feel their browsers are misrepresented.
In my runs of the SunSpider benchmark, Safari 4 beta skunked Firefox, which is the primary browser for POSIX platforms. (See the Lab Notes blog for my results.) With Apple's backing and a quick chain for distributing updates, Safari is a browser you need to have. You can download Safari 4 beta, and browse features and screen images, at Apple's Safari site.






