Implement full page zoom in the WebKit browser

Jun 06, '08 07:30:04AM

Contributed by: robg

One of Firefox's niftier features is its full page zoom -- when you increase or decrease the size of page, everything on the page (text, images, etc.) zooms or shrinks at the same time. This helps keep the layout of the page closer to the original design when zooming; the end result (to me, anyway) looks nicer than when zooming just the text. The shipping version of Safari, on the other hand, only zooms or shrinks text, not images and other elements.

If you're running the WebKit version of Safari, however, you can activate full-page zooming using a simple Terminal command. Thanks to pamon for emailing me a pointer to this page on the Surfin' Safari blog that reveals the Terminal command. Quit Safari and WebKit, then enter this command in Terminal:

defaults write com.apple.Safari WebKitDebugFullPageZoomPreferenceKey 1
Launch WebKit, load a page, then experiment with Command-Minus and Command-Plus (technically, Command-Equals). You should see that all objects on the page are being resized, not just text. Note that Safari, because it uses an older version of the WebKit engine, won't be able to do full page zooming, even after running the above Terminal command. To reverse the settings, reverting WebKit to the "text only" zoom mode, repeat the above command, but change 1 to 0.

Comments (10)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20080606045109546