Funkcjonalność tej witryny będzie ograniczona w czasie konserwacji. Jeśli artykuł nie rozwiązuje twojego problemu i chcesz zadać pytanie, to nasza społeczność wsparcia jest dostępna na @FirefoxSupport na Twitterze i /r/firefox na Reddicie.

Przeszukaj pomoc

Unikaj oszustw związanych z pomocą.Nigdy nie będziemy prosić Cię o dzwonienie na numer telefonu, wysyłanie SMS-ów ani o udostępnianie danych osobowych. Zgłoś podejrzaną aktywność, korzystając z opcji „Zgłoś nadużycie”.

Więcej informacji

Increase Sessionstore Files or Backup times?

  • 2 odpowiedzi
  • 0 osób ma ten problem
  • 8 wyświetleń
  • Ostatnia odpowiedź od cor-el

more options

Hey I've been having a few problems on the "power user" extreme side of day to day use. I've had a couple big crashes now on Firefox where my session doesn't restore and because I have hundreds of tabs open at any given time I always back them up manually from sessionstore in the folder system. The problem is the session store files always reflect my most recent session- the one that doesn't have anything in it. The older sessions like "previous" and "upgrade" are always weeks old.

Is there a way to save data more frequently into the session store backup folder, or to increase the number of recovery files available to reach back to older sessions? I'd like to count on a backup at least once a week that can't be overwritten by the current session loss.

Hey I've been having a few problems on the "power user" extreme side of day to day use. I've had a couple big crashes now on Firefox where my session doesn't restore and because I have hundreds of tabs open at any given time I always back them up manually from sessionstore in the folder system. The problem is the session store files always reflect my most recent session- the one that doesn't have anything in it. The older sessions like "previous" and "upgrade" are always weeks old. Is there a way to save data more frequently into the session store backup folder, or to increase the number of recovery files available to reach back to older sessions? I'd like to count on a backup at least once a week that can't be overwritten by the current session loss.

Wszystkie odpowiedzi (2)

more options

You can search the Add-ons website for a suitable extensions manager extension.

You can also use code in the Browser Console to save/restore the current session. Creating a backup this way includes PB mode tabs/windows.

To enable the command-line in the console:

See:

You can create a compressed sessionstore.jsonlz4 or not compressed sessionstore.json file with a timestamp.


/* Save Session data to .json or .jsonlz4 */
var ssj = SessionStore.getBrowserState();
if(ssj){
 async function writeFile(aFile,ssj){await IOUtils.writeUTF8(aFile,ssj,/lz4$/.test(aFile) ? {compress:true} : {compress:false});}

 function dts(d){return(d.getFullYear()+"-"+(d.getMonth()+1).toString().padStart(2,"0")+"-"+d.getDate().toString().padStart(2, "0")+"_"+d.toTimeString().replace(/:/g,"-").split(" ")[0])}

 var fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
 fp.init(window, "Save Session", Ci.nsIFilePicker.modeSave);
 fp.appendFilter("JSON/LZ4 Files", "*.json*");
 fp.defaultString = "sessionstore-"+dts(new Date())+".jsonlz4";
 fp.open(aResult => {
  if (aResult == Ci.nsIFilePicker.returnOK || aResult == Ci.nsIFilePicker.returnReplace) {
   try {
    writeFile(fp.file.path, ssj);
    alert("Saved as:\n" + fp.file.path);
   } catch (err) {alert(err);}
  } else {alert("CANCELED");}
 });
}

/* Restore Session data from .json or .jsonlz4 */
async function readFile(aFile){
 var ssj = await IOUtils.readUTF8(aFile, /lz4$/.test(aFile) ? {decompress:true} : {decompress:false});
 SessionStore.setBrowserState(ssj);
}

var fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
fp.init(window, "Open File - Load Session", Ci.nsIFilePicker.modeOpen);
fp.appendFilter("JSON/JSONLZ4", "*.*json*");
fp.open(aResult => {
 if (aResult == Ci.nsIFilePicker.returnOK) {
  try {
   readFile(fp.file.path);
   alert("Session Restored:\n" + fp.file.path);
  } catch (err) {alert(err);}
 } else {alert("CANCELED");}
});

Zmodyfikowany przez cor-el w dniu

more options

You can look at this tool to inspect a compressed jsonlz4 sessionstore file. This tool works locally, no uploading done.