Sub topic 2
Working with tabs
This chapter covers the working model of tabs in Safari on a Mac: how to open, switch, close, reopen, and rearrange them, and where the common mistakes happen. It assumes you can use Mac menus and windows, and that you have opened websites in a browser before. Menu names can vary slightly between macOS versions.
What a tab is
A tab is one web page held inside a Safari window. A window can hold many tabs, and only one tab is visible at a time. The other tabs keep their pages loaded in the background, so you can switch back without starting over.
Safari shows the tab bar just below the toolbar once a window has two or more tabs. With only one tab, the bar is hidden. You can force it to show with View > Show Tab Bar.
Opening tabs
You can open a tab in several ways. Pick the one that matches what you are doing.
- New blank tab. Press Command-T, choose File > New Tab, or click the plus (+) button at the right end of the tab bar. The cursor goes to the Smart Search field, so you can type right away.
- Link in a new tab. Hold Command and click a link. The link opens in a new tab behind the current one, and you stay on the page you are reading. Hold Command-Shift and click to open the tab and switch to it at once.
- Link from the context menu. Control-click (or right-click) a link and choose Open Link in New Tab.
- Address typed in the Smart Search field. Press Option-Return after typing to open the result in a new tab instead of replacing the current page.
- Bookmarks. Hold Command while clicking a bookmark to open it in a new tab.
Whether Command-Shift opens a tab in the foreground or background can be reversed. Open Safari > Settings > Tabs and look at the option for switching to a new tab when it is created. The exact label differs a little between versions.
Switching between tabs
- Click the tab you want in the tab bar.
- Press Control-Tab for the next tab and Control-Shift-Tab for the previous one.
- Press Command-Shift-] for the next tab and Command-Shift-[ for the previous one.
- Press Command-1 through Command-9 to jump to a tab by position. Whether these keys select tabs depends on a setting under Safari > Settings > Tabs. Other values let the same keys open bookmarks or favorites.
If you have more tabs than fit in the bar, each one shrinks until its title is unreadable. Chapters later in this tutorial cover Tab Overview and the sidebar, which handle that case better than squinting at tiny tabs.
Closing and reopening tabs
Close the current tab with Command-W, or hover over a tab and click the X on its left edge. Closing the last tab in a window closes the window.
Closing a tab by accident is common, and Safari can recover from it:
- Press Command-Z right after closing, which undoes the close in many cases.
- Choose History > Reopen Last Closed Tab.
- For a tab that was closed some time ago, open History > Recently Closed and pick it from the list.
- If a whole window was closed, choose History > Reopen Last Closed Window.
If you want to close everything except one tab, Control-click that tab and choose Close Other Tabs. Control-click also offers Close Tabs to the Right in recent versions.
Rearranging tabs
Drag a tab left or right within the tab bar to change its order. Order matters because the keyboard shortcuts by position follow the visible order, and pinned tabs always stay at the left.
Dragging a tab out of the bar and dropping it on the desktop or outside the window turns it into its own window. The reverse also works: drag a tab from one window's bar into another window's bar to move it. The chapter on moving tabs between windows covers this in more detail.
To duplicate a tab, Control-click it and choose Duplicate Tab. This is useful before you follow a chain of links, because the duplicate keeps the original page in its own tab.
Tab behavior you should know
Each tab has its own history
Each tab keeps its own back and forward history. If you click Back in one tab, the other tabs do not change. A tab you open from a link starts with a history that includes the page you came from, so Back can return you to it.
Background tabs still use resources
Tabs you are not looking at are not free. A page can keep running scripts, playing audio, or holding memory. To find which tab is playing sound, look for the speaker icon on a tab, or use the speaker button in the Smart Search field. Click it to mute that tab. Safari may also unload an inactive tab to save memory, so the page reloads when you return to it. This can lose unsaved form input, so do not leave half-written text in a background tab.
Tabs from links and websites
A website can ask to open a link in a new tab, for example when a link uses a target attribute. Safari follows your tab settings for this. If a site opens a pop-up window rather than a tab, check Safari > Settings > Websites > Pop-up Windows for that site.
Settings that change how tabs behave
Open Safari > Settings > Tabs. The options available depend on your version of Safari, but typically include:
| Setting | What it changes |
|---|---|
| Tab layout | Whether tabs appear in a separate bar below the toolbar or are compact and share the toolbar with the Smart Search field. |
| Show color in tab bar | Tints the toolbar with the color of the page you are viewing. |
| Open pages in tabs instead of windows | Chooses whether links that would open a window use a tab, never, or only automatically. |
| Command-click opens a link in a new tab | Controls what Command-click does with links. |
| Use Command-1 through Command-9 to switch tabs | Chooses whether those keys pick tabs by position. |
The Compact layout is a common source of confusion. It merges tabs and the search field into a single row, which saves space but makes the address less visible. If the tab bar seems to be missing, check whether you switched layouts, not whether tabs are gone.
Common errors and how to fix them
| Problem | Likely cause | Fix |
|---|---|---|
| The tab bar is missing | Only one tab is open, or the bar is hidden | Open a second tab, or choose **View > Show Tab Bar** |
| Command-click replaces the current page | The setting for Command-click is off | Turn it on in **Safari > Settings > Tabs** |
| Command-number shortcuts open bookmarks | The tab shortcut setting is off | Turn on the tab-switching option in the Tabs settings |
| A closed tab is not in History | History was cleared, or the tab was private | The page cannot be restored. Search for it again |
| A page reloads when you return to it | Safari unloaded it to save memory | Expected behavior. Copy important text elsewhere first |
| Tab titles are cut off | Too many tabs for the bar width | Use Tab Overview or the sidebar |
A short worked routine
Suppose you are researching a topic and have read a search results page.
- Command-click three promising results. Each opens in a background tab, and the results page stays in front.
- Press Control-Tab to move to the first new tab and read it.
- Press Command-W when you finish. Safari moves to a neighboring tab.
- If you close a page too soon, press Command-Z or choose History > Reopen Last Closed Tab.
- Drag the most useful tab to the left so it is easy to find later.
This routine keeps your hands on the keyboard and avoids filling one tab with a long chain of pages.
Exercise
You Command-click a link, but it replaces the current page rather than opening a new tab. You also notice that Command-2 opens a bookmark instead of jumping to the second tab. Where do you look to fix both, and what does each fix do?
Show answer
Open Safari > Settings > Tabs. Turn on the option that makes Command-click open links in a new tab, so the link opens behind the current page. Turn on the option to use Command-1 through Command-9 to switch tabs, so those keys select tabs by position instead of opening bookmarks. Exact labels differ a little between Safari versions.
Exercise
You close a tab by accident. Name two ways to bring it back, and explain one case where neither works.
Show answer
Press Command-Z right after closing, or choose History > Reopen Last Closed Tab (History > Recently Closed also works for older tabs). Neither works if the tab was in a Private Browsing window or if you cleared your history, because Safari does not keep the record needed to restore it.