How Safari Ranks Bookmarks, History, and Open Tabs
This article explains the underlying logic Apple's Safari web browser uses to rank and prioritize autocomplete suggestions in the Smart Search Field. By examining how Safari weighs Bookmarks, browsing History, and currently Open Tabs, you will understand how the browser predicts your destination using frequency, recency, and explicit user intent to deliver the most relevant results instantly.
The Core Ranking Metric: "Frecency"
When you begin typing in the Smart Search Field, Safari does not simply list items alphabetically. Instead, it relies on an algorithmic concept known as frecency—a combination of frequency (how often you visit a site) and recency (how recently you visited it). Every URL stored in your browser is assigned a dynamic score based on these two factors, which dictates how high it appears in the autocomplete dropdown.
How the Three Data Sources Compete
Safari pulls data from your Bookmarks, History, and Open Tabs simultaneously, applying different weights to each based on what they represent about your browsing habits.
1. The "Top Hit" (Highest Priority)
Before categorizing results, Safari identifies one or two "Top Hits" and places them at the very top of the autocomplete list. A Top Hit is almost always pulled from your Bookmarks or History. To achieve Top Hit status, a URL must have a massive frecency score and strongly match the characters typed so far (usually matching the beginning of the domain name).
2. Bookmarks vs. History
In the visual dropdown menu, Safari combines these two sources into a single section labeled Bookmarks and History. Behind the scenes, they are weighted differently:
- Bookmarks (Explicit Intent): Bookmarks receive a permanent baseline boost in Safari’s ranking algorithm. Because you manually saved the link, Safari assumes the page is important to you. Even if you haven't visited a bookmarked page recently, it will often outrank a history item that you only visited once or twice. Safari matches typed queries against both the Bookmark’s URL and your custom Bookmark title.
- History (Implicit Habit): History relies entirely on frecency. A unbookmarked website that you visit every morning will quickly accumulate a high score, allowing it to outrank older, rarely clicked Bookmarks. However, History items decay in rank rapidly if you stop visiting them, whereas Bookmarks maintain their baseline priority.
3. Open Tabs ("Switch to Tab")
Safari treats currently Open Tabs—both on your current device and across your iCloud-connected devices—as high-priority contextual matches.
Instead of forcing you to reload a webpage from your History or Bookmarks, Safari recognizes when your typed query matches the title or URL of an active session. It surfaces these results with a Switch to Tab label. If an open tab is a strong match for your query, Safari will often pin it above the standard "Bookmarks and History" section (just below the Top Hit and Search Suggestions) to prevent you from accidentally opening duplicate tabs.
The Visual Hierarchy in the Smart Search Field
While frecency scores determine which specific items are selected, Safari uses a strict visual layout in the dropdown menu to organize them. From top to bottom, the browser generally prioritizes the display order as follows:
- Top Hit: The single highest-scoring Bookmark, History item, or popular web destination.
- Search Engine Suggestions: Relevant queries pulled from your default search engine.
- Switch to Tab: Matching pages that are currently open in your browser.
- Bookmarks and History: A combined list of up to five or six of the next highest-scoring saved links and past visits.
On-Device Learning and Keystroke Mapping
Safari constantly refines its prioritization using on-device machine learning. The browser maps specific keystrokes to your final selections.
For example, if you type the letter "R" and bypass the Top Hit to click on a specific Bookmark three times in a row, Safari alters its local weighting. The next time you type "R", that specific Bookmark will be promoted to the Top Hit, overriding a History item that might technically have a higher overall visit count. This ensures that your active choices ultimately trump raw historical data.