为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Is there a way to preserve/archive full page queues for tabs?

  • 7 个回答
  • 1 人有此问题
  • 1 次查看
  • 最后回复者为 cor-el

more options

I don't know if it scales based on memory and how many tabs you've got open, but usually even with lots of tabs, the queue for how many pages you can navigate forward or backward for a given tab will go 30-40 deep before I start to lose the oldest pages from those queues. But if I end that session and restore it later, the tabs won't remember anything past the ten or so most recent pages. Anything beyond that is shed.

So, before I terminate the frozen session of Firefox I'm looking at, is there a file I can go pick out and back-up (like a sessionstore/recovery.js if I was looking to preserve certain sessions in general) that will allow me to restore the session without shedding a ton of pages I have queued up in various tabs?

Thanks.

I don't know if it scales based on memory and how many tabs you've got open, but usually even with lots of tabs, the queue for how many pages you can navigate forward or backward for a given tab will go 30-40 deep before I start to lose the oldest pages from those queues. But if I end that session and restore it later, the tabs won't remember anything past the ten or so most recent pages. Anything beyond that is shed. So, before I terminate the frozen session of Firefox I'm looking at, is there a file I can go pick out and back-up (like a sessionstore/recovery.js if I was looking to preserve certain sessions in general) that will allow me to restore the session without shedding a ton of pages I have queued up in various tabs? Thanks.

被采纳的解决方案

REDKK said

So you're saying I could rescue the page queues for the tabs by actually opening and editing the sessionstore/recovery.js files? I'm definitely in the habit of backing those up, but I've never tried editing them before. Can I use Notepad for that?

Editing would be extremely difficult. You can mine the URLs out of them, and depending on whether you want to roll back to one of them, you could "swap" in one of them (while Firefox is closed) so Firefox will read and restore it.

Extract the URLs from the old file as clickable links

This is a useful approach when you need to examine a number of files and you don't want to lose your current session, or just want to keep documentation.

One-time Setup:

(0) Install the "Session Extractor" bookmarklet (see the instructions in the top bar of the page for how to install it):

https://www.jeffersonscher.com/res/sumomarklets.html#SessExtr

To Extract the URLs:

In the folder where you copied your session history files for safekeeping:

(1) Create a copy of the session history file you want to mine for URLs and rename it with a .json extension.

For example, right-click the upgrade.js... file, choose Copy, then right-click a blank area of the list and choose Paste.

Note: By default, Windows hides the .js extension. This is all easier if you can see it. http://windows.microsoft.com/en-us/windows/show-hide-file-name-extensions

Right-click > Rename the upgrade - Copy.js... file to upgrade.json (or upgrade.txt if you prefer).

(2) Open the upgrade.json file in a Firefox tab. Either drag the renamed file and drop it on an existing page to load the json/txt file in its place, or right-click the file and choose Open With and use Firefox.

(3) In the tab displaying the session history file, click the bookmarklet button to run the script. This should generate a new page listing the URLs of each open tab from the file. You can select and copy this list and paste it somewhere for safekeeping, and/or you can just use the links now.

Unfortunately, if you want to save that page "as is" (as an HTML page), there's an extra step: press Ctrl+U to launch the "view source" page, and save that as a .htm or .html file. For some reason, saving the original page gives you the original session file instead of the formatted list of links.

"Roll back" Firefox to an earlier session history file.

The way you do this is to shut down Firefox, hide all its existing session history, then copy the old file into your profile folder and name it sessionstore.js so Firefox uses that at startup. Users say it doesn't always work, but it's the only current way to feed an old session to Firefox.

If "session state" is important -- the cookies in effect at that time -- then this is your best option.

The detailed steps for the "swap" were in this post: https://support.mozilla.org/questions/1144076#answer-929701

定位到答案原位置 👍 1

所有回复 (7)

more options

You can modify the number of live session back-forward history page AND the number of restored session back-forward pages. I realize I'm not answering your actual question, but that's because this seems way easier.

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful.

(2) In the search box above the list, type or paste sess and pause while the list is filtered

(3) Live Session: To change the total from 50 to something else, double-click the browser.sessionhistory.max_entries preference and enter the desired value.

(4) Restored Session: To change the maximum back pages from 10 to something else, double-click the browser.sessionstore.max_serialize_back preference and enter the desired value.

(5) Restored Session: I think the default "-1" for the browser.sessionstore.max_serialize_forward preference means keep ALL of the forward tab history pages, but I rarely keep tabs that I've gone very far back in so I can't be sure it's all of them.

由jscher2000 - Support Volunteer于修改

more options

This indeed sounds like it'll solve all my problems with this going forward. Only thing is, my current session is severely unresponsive. Practically frozen. Not sure I can navigate to the config, let alone have changes take. Any idea if restarting Firefox and modifying the browser.sessionstore.max_serialize preferences before I restore the session will save me with this current session it looks I'm going to have to forcibly end?

more options

Hopefully Firefox won't be too taxed to go into about:config!

If it's not possible, Firefox should save your session if you crash out of it, but it may also trim the back history on restart if it didn't get a chance to do it at shutdown. Do you want to try to save the files by hand first in case they haven't been trimmed yet?

You can do this from outside Firefox if necessary:

Type or paste the following into the Windows Run dialog or the system search box and press Enter to launch Windows Explorer:

%APPDATA%\Mozilla\Firefox\Profiles

In that folder, do you see a semi-randomly-named folder? If so, click into it. If you find multiple such folders, find the one that was most recently updated.

In your profile folder, scroll down and double-click into the sessionstore-backups folder. Save all current-date files (or all files) in this folder to a safe location, such as your Documents folder.

Reading these files is a bit of a chore, since the json format is one very long line not intended to be easily read by humans, but there are some tricks you could try once you have Firefox in a healthier state.

more options

Yeah, I was able to open a new tab and get it pasted into the address bar, but it won't actually progress to the config (or caution prompt).

So you're saying I could rescue the page queues for the tabs by actually opening and editing the sessionstore/recovery.js files? I'm definitely in the habit of backing those up, but I've never tried editing them before. Can I use Notepad for that?

more options

选择的解决方案

REDKK said

So you're saying I could rescue the page queues for the tabs by actually opening and editing the sessionstore/recovery.js files? I'm definitely in the habit of backing those up, but I've never tried editing them before. Can I use Notepad for that?

Editing would be extremely difficult. You can mine the URLs out of them, and depending on whether you want to roll back to one of them, you could "swap" in one of them (while Firefox is closed) so Firefox will read and restore it.

Extract the URLs from the old file as clickable links

This is a useful approach when you need to examine a number of files and you don't want to lose your current session, or just want to keep documentation.

One-time Setup:

(0) Install the "Session Extractor" bookmarklet (see the instructions in the top bar of the page for how to install it):

https://www.jeffersonscher.com/res/sumomarklets.html#SessExtr

To Extract the URLs:

In the folder where you copied your session history files for safekeeping:

(1) Create a copy of the session history file you want to mine for URLs and rename it with a .json extension.

For example, right-click the upgrade.js... file, choose Copy, then right-click a blank area of the list and choose Paste.

Note: By default, Windows hides the .js extension. This is all easier if you can see it. http://windows.microsoft.com/en-us/windows/show-hide-file-name-extensions

Right-click > Rename the upgrade - Copy.js... file to upgrade.json (or upgrade.txt if you prefer).

(2) Open the upgrade.json file in a Firefox tab. Either drag the renamed file and drop it on an existing page to load the json/txt file in its place, or right-click the file and choose Open With and use Firefox.

(3) In the tab displaying the session history file, click the bookmarklet button to run the script. This should generate a new page listing the URLs of each open tab from the file. You can select and copy this list and paste it somewhere for safekeeping, and/or you can just use the links now.

Unfortunately, if you want to save that page "as is" (as an HTML page), there's an extra step: press Ctrl+U to launch the "view source" page, and save that as a .htm or .html file. For some reason, saving the original page gives you the original session file instead of the formatted list of links.

"Roll back" Firefox to an earlier session history file.

The way you do this is to shut down Firefox, hide all its existing session history, then copy the old file into your profile folder and name it sessionstore.js so Firefox uses that at startup. Users say it doesn't always work, but it's the only current way to feed an old session to Firefox.

If "session state" is important -- the cookies in effect at that time -- then this is your best option.

The detailed steps for the "swap" were in this post: https://support.mozilla.org/questions/1144076#answer-929701

more options

Well, I backed up my session files before crashing out and restarting, but it turns out I didn't need to. I was able to modify the preferences in about:config and the changes seem to have taken without me even having to replace the original files in my profile folder. Let the record show that the trimming occurs not on restart, but when you actually restore the session.

Thanks a ton for your quick help throughout this ordeal! Much appreciated.

由OMT于修改

more options

See also the descriptions in this file (open via the location bar):

  • resource:///defaults/preferences/firefox.js
// number of back button session history entries to restore (-1 = all of them)
pref("browser.sessionstore.max_serialize_back", 10);
// number of forward button session history entries to restore (-1 = all of them)
pref("browser.sessionstore.max_serialize_forward", -1);