Clear the "back/forward" history of a pinned tab?
Hi all,
A few years ago 'delicene' posted this very question (https://support.mozilla.org/en-US/questions/847382) and 'cor-el' posted a useful answer, however, Firefox has changed a lot since this was posted and I have been unable to work this. Does anyone know of a way to achieve the very same trick today.
Many thanks
Chris
被采纳的解决方案
That code should still work in the Browser Console (Firefox/Tools > Web Developer) that has replaced the Error console.
This will clear the tab history for all tabs and all windows and not for a specific tab. Also data about closed Tabs and Windows is removed (History > Recently Closed Tabs/Windows sections).
See onPurgeSessionHistory in resource:///modules/sessionstore/SessionStore.jsm
var os = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); os.notifyObservers(null, "browser:purge-session-history", "");定位到答案原位置 👍 0
所有回复 (4)
选择的解决方案
That code should still work in the Browser Console (Firefox/Tools > Web Developer) that has replaced the Error console.
This will clear the tab history for all tabs and all windows and not for a specific tab. Also data about closed Tabs and Windows is removed (History > Recently Closed Tabs/Windows sections).
See onPurgeSessionHistory in resource:///modules/sessionstore/SessionStore.jsm
var os = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); os.notifyObservers(null, "browser:purge-session-history", "");
由cor-el于
I seem to be having a few issues here. Whilst the Browser Console starts, it does not contain the command line interpreter that I can see in the web console. It just appears as a pop out windows containing logging info.
However, even if I run the command in the Web Console i see an error:
TypeError: Components.classes is undefined The Components object is deprecated. It will soon be removed.
Never mind. I see that the Console is disabled by default in Firefox 30. Enabling Chrome Debugging and running the command seem to have done the trick.
I had hoped that this would reduce the ridiculous memory consumed by Firefox, but it's still running at over 0.5GB - however, I have got this down from well over 1GB!!!
Sorry. I forgot that you need to toggle the devtools.chrome.enabled pref to enable the command line. I had this issue as well a while back.
It is mentioned in the MDN article: