question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can I use session restore but also sanitize history? [solved: no: instead disable history in the first place and don't sanitize it on close]

See original GitHub issue

🟥 https://github.com/arkenfox/user.js/wiki/5.2-Troubleshooting

  • [ * ] I have read the troubleshooting guide, done the checks and confirmed this is caused by arkenfox
    • unchecked issues may will be closed as invalid

🟪 REQUIRED INFO

  • Browser version & OS:
  • Steps to Reproduce (STR): Have tabs open and close the browser.
  • Expected result: Have the tabs restored with the browser history erased.
  • Actual result: Tabs and history erased.
  • Console errors and warnings: None.
  • Anything else you deem worth mentioning:

I have added these as instructed:

user_pref("browser.startup.page", 3); // 0102
  // user_pref("browser.privatebrowsing.autostart", false); // 0110 required if you had it set as true
  // user_pref("places.history.enabled", true); // 0862 required if you had it set as false
user_pref("browser.sessionstore.privacy_level", 0); // 1003 [to restore cookies/formdata if not sanitized]
  // user_pref("network.cookie.lifetimePolicy", 0); // 2801 [DON'T: add cookie + site data exceptions instead]
user_pref("privacy.clearOnShutdown.history", false); // 2811
  // user_pref("privacy.clearOnShutdown.cookies", false); // 2811 optional: default false arkenfox v94
  // user_pref("privacy.clearOnShutdown.formdata", false); // 2811 optional
user_pref("privacy.cpd.history", false); // 2812 to match when you use Ctrl-Shift-Del
  // user_pref("privacy.cpd.cookies", false); // 2812 optional: default false arkenfox v94
  // user_pref("privacy.cpd.formdata", false); // 2812 optional

However, this makes both the tabs and the history to not be erased on close, I was wondering if we could keep the tabs, but have the history erased only.


Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
rusty-snakecommented, Jun 3, 2022

Then both the browser history and the tabs are restored on closing, I want the tabs to be restored but the history to be erased, is that possible?

No, if you set privacy.clearOnShutdown.history=true SR does not work. What does work however is disabling history (5013) and SR.

https://github.com/arkenfox/user.js/blob/662eddbc2124d9d09774da7d5bc385f45c287c0d/user.js#L1025-L1028

2reactions
Thorin-Oakenpantscommented, Jun 3, 2022

No, if you set privacy.clearOnShutdown.history=true SR does not work.

thank you Rusty for doing what was asked. You had one job, one pref … sigh

What does work however is disabling history (5013)

not sure what the trailing and SR means. So there you go, thanks Rusty, a solution: you will not have any history during your sessions, and no history can be restored, and you do not need to sanitize history on close (and thus it won’t nuke SR - IDK why clearing history on shutdown (or manually?) nukes SR, it just how everything was engineered from way back in the Before Times)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Restore session does not work when (all) history is set to be ...
Hi,. the title says it all, here are the steps to reproduce: 1. Check "Restore previous session". 2. Select "Use custom settings for...
Read more >
Disable Google Chrome session restore functionality [duplicate]
Chrome offers to restore the last session when it did not shutdown properly (power outage, Chrome crashed, ...). How do I disable that?...
Read more >
How to clear browsing history using JavaScript?
There is no way to clear the session history or to disable the back/forward navigation from unprivileged code. The closest available solution is ......
Read more >
Remarks by President Biden Before the 77th Session of the ...
Let us speak plainly. A permanent member of the United Nations Security Council invaded its neighbor, attempted to erase a sovereign state from ......
Read more >
Aircraft engine operation and malfunction - FAA
The purpose of this text is to provide straightforward material to give flight crews the basics of airplane engine operational theory. This text...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found