Most Mac users know that they can close a tab in Safari by either clicking on the tab’s small “x” icon or by using the keyboard shortcut Command-W. But Mac Geek Gab listener Dale discovered a relatively unknown method for closing a Safari tab that multitouch gesture fans will love.
First, it’s important to note that there are few caveats with this tip, and that the method described here won’t work in all situations. As stated, this tip involves a swipe gesture, so you’ll need to be using a MacBook’s built-in trackpad, a Magic Trackpad, or a Magic Mouse. The second caveat is that this only works for new tabs which launch automatically. For example, if you left-click on a website link that’s configured to open in a new page or a new browser window. This method won’t work for tabs that are launched manually by holding the Command key while you click or by using the right-click menu to “Open in a New Tab.”
With those restrictions out of the way, here’s how this method works. If you click a link in Safari that opens in a new tab, swipe back with two fingers to close the tab.
This is the same gesture you would normally use to go back to the previous page, and you would think it wouldn’t work in this case because there’s no “previous page” on a freshly opened browser tab. But, behold, if you’re working with a tab that launched automatically (as described in the caveats above), then this gesture closes the new tab and takes you back to your previous tab.
Remember that the gesture to use here is a two-finger swipe either right-to-left or left-to-right depending on your “natural” scrolling selection in the macOS System Preferences.
Closing tabs wasn’t difficult or time-consuming to begin with, but this neat gesture is a handy one to keep in mind.