The NSTitle key in windows.plist is not cleared on exit when using private browsing

On MacOS, the title (i.e., from the <title> element) from the last opened browser tab in a private window is stored on exit in the windows.plist file, even when settings are set to clear all browsing data on exit. The full path of the windows.plist file is /Users/:username:/Library/Saved Application/State/com.brave.Browser.savedState/windows.plist. The last window title is stored in the NSTitle key.

*How can this issue be reproduced?

  1. Go to brave://settings/clearBrowserData, click on “Clear browsing data,” click on “On exit,” check all of the options, and click Save.

  1. Open a private window and navigate to any website website.

  1. Quit Brave.

  2. Open /Users/:username:/Library/Saved Application/State/com.brave.Browser.savedState/windows.plist and see that the visited website’s title is stored under the NSTitle key.

Expected result:
NSTitle key is cleared on exit (or not stored at all for private windows).

Brave Version( check About Brave):
Version 1.46.144 Chromium: 108.0.5359.128 (Official Build) (arm64)

Computer Info:
Apple M2, macOS Ventura 13.1.

Additional Information:
Note that the NSTitle key and value do get removed when triggering Clear Browsing Data manually by going to the Brave menu and clicking “Clear Browsing Data…”.

1 Like

@jstafman please accept my apologies for this issue. Please do the following to see if the issue gets solved, go to SettingsPrivacy and SecurityClear Browsing HistoryOn exitBrowsing history.

Let me know if that works.

@Kevin_cc - Thanks for the quick response. As you can see, your suggestion was included in Step 1 of my reproducible procedures, so unfortunately, is not a solution. If you have a Mac, do you see the same results on your machine?

1 Like

@jstafman hi again, I was not able to replicate this same issue on my end. Please try installing the Beta or Nightly version of Brave to see if the issue persists on those versions.

Be waiting for your response.

@Kevin_cc - I followed the same procedures (with two immaterial differences listed below) that I listed in my original post using the Nightly version, and am experiencing the same result.

The two differences from my original procedures:

  1. The windows.plist file is located here (due to using the Nightly version): /Users/:username:/Library/Saved Application State/com.brave.Browser.nightly.savedState/windows.plist.

  2. I tested a different website:

Here is the Nightly windows.plist file, where you can see that the value for NSTitle is the value from the website <title>:

This is a screen shot from the website in Brave Nightly so you can see that the title matches exactly:

Quick follow-up: I did some looking around and found this Velociraptor link that appears to have relevant information and reference links. It seems like this issue has something to do with saving the application state so that windows can be restored when an app is reopened.

Here is one of the additional reference links that has more details:

Interestingly enough, I’m unable to reproduce this error. For me, I do see the NSTitle value set as the last site that I visited, but only for the standard browsing window I had open. Here are the steps I took to reproduce, please tell me if I should change any of them to get the issue to occur:

  1. Opened Brave (stable, v1.46.144) — Netflix show I was watching was streaming
  2. Opened a Private window
  3. Closed the original window
  4. Visited
  5. Quit the browser, then viewed NSTitle value in com.brave.Browser.savedState:

I also tried this while the browser was closed (not quit), opening only a Private tab and then repeating steps 4 and 5 without any success.

This is very strange. I checked again and I’m definitely seeing it still occur on my end. Would you mind trying one more time, but try closing the original window before opening the private window (i.e., flipping steps 2 and 3)?

Also, what version of macOS are you using? I’m using Ventura 13.1. If we’re using different versions, there’s a chance that might be the explanation.

Same result for me here — shows what I was viewing in the standard browsing window before closing it:

I’m also on Ventura 13.1

Thank you for checking that; I figured it was a long shot.

Do you have any suggestions for next steps to diagnose? I am able to reproduce my results on my machine consistently, so perhaps there is a macOS system setting that’s causing this?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.