We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Is it possible to clear the "back/forward" history of a tab?

  • 4 回覆
  • 14 有這個問題
  • 5 次檢視
  • 最近回覆由 cor-el

more options

Is it possible to clear the back/forward history of a specific tab?

Especially the tabs that you pin as "App Tab" will get cluttered. Web sites like gmail, google reader create a new history entry almost every time and I am pretty sure this has some performance ramifications.

Is it possible to clear the back/forward history of a specific tab? Especially the tabs that you pin as "App Tab" will get cluttered. Web sites like gmail, google reader create a new history entry almost every time and I am pretty sure this has some performance ramifications.

所有回覆 (4)

more options

Is it possible to clear the "back/forward" history of a specific tab? :

You can go back to the earliest entry in the tab and open a new page so that you remove all of the forward history, but you can't remove the original or reduce it to just the original entry in the tab.

App-tabs are pretty much like regular tabs except that the tab is protected from opening a direct link or bookmark to another site within the app-tab -- that does not apply to bookmarks with substitution or javascript as they will open in the same app-tab.

App-tabs provide no more protection than normal tabs against web pages like this one while composing a reply where the typed text is frequently lost during composing and have to start over.

more options

Copy and paste this code in the Code field in the Tools > Error Console and click the Evaluate button to clear the tab session history. This code also works for extensions that allow to run code with chrome privileges (Keyconfig, mouse gestures, custom button, PrefBar).


var Cc=Components.classes, Ci=Components.interfaces;
var os = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
os.notifyObservers(null, "browser:purge-session-history", "");

由 cor-el 於 修改

more options

That last one worked like a charm. Is there any side effects to this? Other than losing all your session history - rather than a single tab?

Now how to make it into a button would be another question...

more options

PrefBar uses this code in the "clear all history" button to remove the session history.
I do not want to delete all the history, so I've created a button with just this code and never had any problems with it.
I use it to keep tabs and sessionstore.js clean with tabs that I reopen in every session.