Mac: Making Safari open links in a tab
I've mentioned before that I really like Safari as my default browser, mainly because it's lightning fast, even more so with version 3.1. One of my pet peeves with it is the way it handles opening links that are targeted for a new window.
Links on a web page either go within the current browser window (or tab) or can be targeted to a window - the author of the page determines the target. Web sites will often target a new window because they don't want the user to leave their site. While this is all fine, I personally can't stand having a ton of browser windows open. The tabbed interface model for browsers is perfect for me - I like to open new browser windows as tabs and then be able to quickly switch between them.
There's a setting in Safari that allows you to open any link on a page in a new tab instead of a new browser window. Under Safari / Preferences / Tabs you can select the option that Command-Click opens any link in a new tab. I can also use my Logitech's scroll wheel button (Mouse Button 3) to perform that action.
The problem in Safari is that if the target for a link is a new window, Safari opened it in a new browser window. Man this drove me nuts until tonight.
Jon Sabino dropped in a comment on my last post mentioning an article on The Unofficial Apple Weblog about how to fix this problem. It's as simple as opening a terminal window and pasting in the following line:
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
Shut down Safari and restart it and off you go! From now on clicks that would normally open a whole new browser window will instead be targeted in a new tab in your current Safari window.
Thanks for the great tip Jon!