This article originally appeared in TidBITS on 2010-06-09 at 5:01 a.m.
The permanent URL for this article is:
Include images: Off

Apple Extends Safari 5 with Reader, HTML5, Performance

by Adam C. Engst

In a WWDC keynote dominated by the iPhone 4 and iOS 4, Steve Jobs didn't so much as mention Apple's other major release of the day: Safari 5 [1] for both Mac and Windows. In step with the version number, Apple is focusing on five new features [2] of Safari 5: Safari Reader, more support for HTML5, better performance, support for Bing in the search bar, and a Safari Developer Program that enables developers to create extensions.

Safari Reader -- The primary user-focused feature in Safari 5 is Reader, which extracts the text from recognized articles and displays it without ads, site graphics, or other visual distractions. Plus, on sites that break longer stories into multiple pages, such as the New York Times, Safari Reader automatically follows the necessary links to present the entire story on one long scrolling page. A translucent pop-up at the bottom of the screen provides controls for changing text size, sending the page via email as a Web archive, and printing the page.

You invoke Safari Reader by clicking the Reader button in the address bar (or choosing View > Enter Reader [Command-Shift-R]), and it displays the page in what looks like a JavaScript-driven lightbox - sort of a Web-based dialog where the rest of the page is darkened and the Reader display is inset within it. The controls for changing text size, sending email, and printing aren't new - the standard menu commands and their associated keyboard shortcuts have existed for quite some time. (They are: View > Zoom In [Command-+], View > Zoom Out [Command--], File > Mail Contents of This Page [Command-I], and File > Print [Command-P].)

[image link] [3]

There are some interesting quirks related to Safari Reader. Most notably, there's no way to know which sites it supports, or, more to the point, which HTML tags it uses to identify articles within a site. For instance, Safari Reader doesn't work on the TidBITS home page, but does work on TidBITS articles. And it does work on the Take Control home page, but not on Take Control News posts. On the sites I tried, including TidBITS, Safari Reader considers reader comments to be "visual distractions" and doesn't display them.

Also, the Reader button in the address bar replaces the RSS button, leaving one to wonder how you'd subscribe to a site's RSS feed if Safari Reader is active. The answer is to click and hold on the Reader button, which reveals the normal RSS menu for various feeds.

[image link] [4]

Unfortunately, the visible control for sending the page via email uses the Mail Contents of This Page command, rather than Mail Link to This Page (Command-Shift-I). If you want the latter, invoke it manually from the File menu or keyboard shortcut. Happily, though, if you invoke Print (in any way) while Safari Reader is showing, the resulting printout reflects the much cleaner Reader display rather than the normal Web site layout.

Safari Reader will undoubtedly prove controversial in some circles because it will reduce the click-through rate on ads even further, especially for sites that break long articles into multiple pages - each with their own set of ads. Even beyond the advertising issue, it's somewhat distressing to see Apple deciding for a publication what content is and is not relevant. On the TidBITS site, for instance, we consider our reader comments highly relevant, along with related articles that link to the article being read, but Safari Reader hides all of that and more. I'd like to see Apple publicize how Safari Reader works so publications could choose what parts of their content would be recognized, and how.

All that said, Safari Reader is notable mostly because it has been built into one of the main Web browsers by default. There have been numerous ways of focusing on the text of an article on a Web page over the years; the most impressive ones I've seen are Readability [5] (on which Safari Reader was based) and Readable [6], both of which operate via JavaScript-based bookmarklets. Both should work in any modern browser.

Improved HTML5 Support -- Apple is now making a very big deal about how the iOS supports two platforms, native iOS apps and HTML5-based Web apps. As a result, it's not surprising that Safari 5 on the Mac now boasts greater HTML5 support, with things like full-screen video, closed captioning for video, location services, and much more.

HTML5 support is one of those chicken-and-egg situations at the moment, since Web developers can't rely heavily on it until it's well-supported in most browsers, and browser makers may not have significant incentive to support it well until it has wide adoption. (For useful information showing what tags are likely safe to use for different browser versions, see the When Can I Use... [7] site.) So it's good to see Safari 5 trumpeting its HTML5 support, since that will raise the bar for other browser makers. Using the HTML5 Test [8] site (which could be biased in some way), I found that Safari 5 is indeed the most-compliant HTML5 browser around, edging out Google Chrome. The scores are out of a total of 300 points.

Better Performance -- Apple claims better performance in Safari 5 on three fronts: the Nitro JavaScript engine, DNS prefetching, and improved page caching. Although Apple has some charts showing Safari to be the fastest browser available, it's hard to translate benchmarks into real-world performance.

For instance, although Apple says that Safari 5's Nitro JavaScript engine is 30 percent faster than Safari 4's, 3 percent faster than Chrome, and twice as fast as Firefox 3.6, it was hard to see the difference on JavaScript-intensive sites I use. Part of the problem is that many such sites are using AJAX, so although JavaScript is being used to present an interface to the user, there's also a bunch of back-end work happening that isn't always quick.

DNS prefetching is quite neat - if you're on a page containing links to other sites, Safari 5 automatically looks up those addresses so when you click on one, it already knows the site's address, reducing the time necessary to load the page. Apparently, this feature [9] has existed in Google Chrome for some time; thanks to commenter Glenn Rempe for the tip.

Page caching is the final feature that Apple claims to have improved in Safari 5, though Apple says only that additional types of Web pages are now cached, without giving any specifics.

Bing Search -- Also new in Safari 5 is the addition of Bing to the search engine options in Safari 5's General preferences; it joins Google and Yahoo. Apple also added Bing to the search engine options in iOS 4, and it's hard to know quite what to make of the addition.

According to the Stat Owl site, Google dominates the search engine world [10] with 86 percent of the market. Bing is second with 6 percent, and Yahoo third with 4.92 percent. So it's possible that Apple merely wants to help even the playing field, especially when you consider that Google's share of the search market for the Safari browser is over 95 percent. Given the tension between Apple and Google of late, I could see Apple wanting to spread the search traffic around so as not to become entirely dependent on Google for search.

Of course, the inclusion of Yahoo Search sort of already did that, but since July 2009, Yahoo Search has been powered by Bing. Oddly, the databases or algorithms must be slightly different, since Yahoo Search and Bing don't present quite the same results to the same searches.

Safari Extensions -- The last of Apple's marquee features in Safari 5 is support for Safari Extensions, something that has been needed for a long time. Developers have resorted to all sorts of ugly hacks to modify Safari's behavior in the past, and hopefully the new extensions will enable developers to extend Safari in interesting ways while playing within the rules. Extensions are managed in a new Extensions pane in Safari's preferences, which implies that automatic updating of extensions will be available. (The Extensions pane appears only once you've installed an extension, or if you enable the Develop menu from the Advanced pane, and then choose Develop > Enable Extensions.)

[image link] [11]

A new Extension Builder application helps developers create Safari Extensions, which can put buttons on the toolbar, change the way Web content appears, add controls to Web pages, and more. Safari Extensions rely on HTML5, CSS3, and JavaScript, so they should be more accessible to Web developers than would an extension model that requires Cocoa programming in Xcode.

Although it's hard to determine the specifics, it looks as though Apple may be evaluating Safari Extensions in some way. All Safari Extensions must be signed with an Apple-provided digital certificate that comes free with membership in the Safari Developer Program. The certificate ensures that Safari Extensions aren't tampered with and come from the developer they say they do, which is good, and they use sandboxing to increase security. Plus, Safari Extensions can be submitted to the Safari Extensions Gallery, opening in a few months, where users can find and download extensions. It's unclear if there will be any vetting of Safari Extensions along the lines of iOS apps.

More Features -- Other changes in Safari 5 are smaller, but some will be extremely welcome. For instance:

Safari 5 is available via Software Update, or as a 37.46 MB download [16] from the Apple Support Downloads site. It's free, of course, and requires Mac OS X 10.5.8, 10.6.2, or 10.6.3. If you're still using Mac OS X 10.4 Tiger, you can take advantage of many of Safari 5's features other than Safari Reader by upgrading to Safari 4.1 for Tiger [17], which is a 29.46 MB download from Apple's Support Downloads site; it's also available via Software Update. The Windows versions of Safari 5 run under Windows XP, Windows Vista, and Windows 7; they seem to be available from the same Support Downloads page as the Mac version of Safari 5.