Safari Private Browsing: Cookies, Storage, and History
This article provides a quick overview of how the Safari web browser handles your temporary session data when you exit Private Browsing mode. Specifically, it explains the immediate deletion of cookies, the wiping of local storage, and the absence of browsing history logs once all private windows are closed, ensuring your local activity remains completely erased from the device.
Browsing History
When you use Private Browsing in Safari, the browser never writes your visited URLs or search queries to the hard drive.
- During the session: Safari temporarily remembers the pages you visit only so that the "Back" and "Forward" buttons function properly within that specific tab.
- When windows are closed: The moment you close all Private Browsing windows, this temporary directional history is permanently erased from your device's active memory (RAM). No record of the websites you visited or the searches you performed will appear in your main History menu. Additionally, your AutoFill information and search suggestions remain unaffected.
Cookies
Websites use cookies to remember your login states, preferences, and tracking identifiers. Safari handles cookies in Private Browsing by isolating them from your standard browsing profile.
- During the session: Safari accepts cookies from websites you visit so that the sites function correctly—allowing you to log into accounts or add items to a shopping cart. However, these cookies are stored purely in your device's temporary memory rather than on your hard drive, and they cannot access cookies from your normal, non-private browsing sessions.
- When windows are closed: Closing all Private Browsing windows triggers Safari to immediately purge all cookies collected during that session. If you open a new Private Browsing window afterward, websites will treat you as a brand-new visitor, and you will be logged out of any accounts you accessed previously.
Local Storage
Websites use HTML5 Local Storage, Session Storage, and IndexedDB to store larger amounts of data on your device than cookies allow. This helps web applications load faster and work offline.
- During the session: Safari creates a temporary, in-memory storage container for websites that require local storage to function. The website believes it is writing data to your device, but Safari is actually holding this data in a volatile state.
- When windows are closed: Once all Private Browsing windows are closed, Safari destroys this temporary storage container. All cached data, web application states, and locally stored files generated during the private session are permanently deleted.
What Remains After Closing Private Windows
While cookies, local storage, and browsing history are completely wiped upon closing all Private Browsing windows, a few user-initiated actions will remain on your device:
- Downloaded Files: Any file you explicitly downloaded to your device will stay in your Downloads folder, though the list of downloads within Safari's interface will be cleared.
- Bookmarks: Any new bookmarks you created during the private session will be saved.
- Reading List Items: Pages you manually added to your Reading List will remain accessible.