How to Reopen Closed Safari Tabs and Windows and Access Past History

Safari's Undo Tabs screenshot

Safari has long had an undo feature, letting you recover from accidental mistakes, such as entry errors and general typing mistakes. But ever since Safari 5 and OS X Lion, the undo feature has grown to include the ability to reopen tabs and windows that you accidentally closed.

Restore Closed Tabs

If you've ever been working in Safari with multiple tabs open, perhaps researching a problem, then you know the sheer agony of accidentally closing one of the tabs. In just a moment, what may have been hours of research is gone, all with a single click of the mouse or trackpad.

Luckily, Safari will remember the tab you just closed, and with a trip to a Safari menu, or a quick keyboard command, your lost tab can be reopened.

  1. In Safari, select Undo Close Tab from the Edit menu.

  2. Or, you can use the following keyboard command: command (⌘) Z.

You need to reopen a closed tab fairly quickly; Safari uses it's normal undo command to restore the closed tab. The upshot is the undo buffer only holds a single tab. If you close another tab, you can only reopen the last tab you closed.

Restoring Closed Windows

If you close a Safari window, you can reopen the window just as you can reopen a closed tab. Actually, the process is slightly different, but the same rules apply; Safari will only open the last closed window. You can’t go further back, say to reopen the last three windows. Safari only maintains a single window in its undo buffer.

To reopen a closed window:

  • From Safari’s History menu, select Reopen Last Closed Window.

There's no built-in keyboard shortcut for reopening a closed window in Safari, however, you can create your own keyboard shortcut.

Reopen Safari Windows From Last Session

Besides being able to reopen closed Safari windows and tabs, you can also open all Safari windows that were open the last time you quit Safari.

Safari, like all of the Apple apps, can make use of OS X’s Resume feature, which was introduced with OS X Lion. Resume saves the state of all of the open windows of an app, in this case, any Safari window you have open. The information is saved when you quit Safari. The idea is that the next time you launch Safari, you can resume right where you left off.

Many Mac users turn the Resume feature off, or they turn it off for specific apps. If you have Resume turned off for Safari, you can still open the windows from the last Safari session with this command:

  • From the History menu, select Reopen All Windows From Last Session.

This can be extremely helpful if you quit Safari, and then realize you weren’t done with the app, or if Safari quit on you due to some unknown problem.

Using History to Reopen a Safari Window

We’ve already seen that the History menu in Safari has some pretty neat capabilities, including letting you recover from accidentally closing a Safari window. But it can do quite a bit more. It can even get you out of the bind you may find yourself in when a Safari window you accidentally closed can’t be reopened using the Undo or Reopen commands ​because the Safari window you wish to reopen isn't the last one you closed.

Safari keeps a history of the sites you visit and organizes that history chronologically. You can access your Safari history and reopen a website you visited earlier in the day, in the week, in the last month, or longer. It all depends on the Remove History Items setting on the General tab of Safari Preferences. Assuming you're not browsing in a private window (Safari doesn't save history from private windows), you can look through the history list and select the website you wish to return to.

In most cases, it's easy enough to find a website in the history list, but sometimes you may not have noticed the actual site name during your browsing. If that’s the case, try looking at websites in the History menu that are listed around the same time frame as when you were browsing.

There are two ways to view and reopen a website you visited:

  • From the History menu, you'll see a list of the last 18 websites you visited; you can select the website you wish to return to from the list. If the site you're looking for is from an earlier time, at the bottom of the history menu you'll find a week’s worth of websites you've accessed, organized by days. You can search through these lists to find the site you need.

The second method provides a bit more detail, including both the site name and the URL. In addition, you can look back over all of your saved history, not just the current week.

  • From the History menu, select Show History.

The Safari browser page will display a year's worth of history in a list. You can scan through this list to find the website you're looking for.

You can leave the History list by either going to a new URL or selecting Hide History from the History menu.