You may have noticed that some links in Safari absolutely refuse to open in the same window. After a while this can leave you with several windows open at once – which can make your desktop a real mess. You can, however, change this so that links that would normally open in a new window will now open in a new tab instead.
To do you need to launch the Terminal and type in the following:
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true
Hit return the quit and restart Safari. Now all of your links that would normally open in a new window will open in a new tab. If you want to change back to the previous settings all you have to do is open Terminal and type in:
defaults write com.apple.Safari TargetedClicksCreateTabs -bool false
The close and restart Safari again.