Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

Recover lost tabs

  • 11 ответов
  • 0 имеют эту проблему
  • 42 просмотра
  • Последний ответ от cor-el

more options

Earlier today I changed my settings in "Privaty & Security" to "Clear history when Firefox closes". In that setting I selected to only delete "Browsing and download history."

I assumed this would just delete my browsing history from the URL bar, but now after I closed Firefox, it also deleted all my tabs!! There were many important tabs that I don't want to lose. But I also can't find them under 'recently closed tabs', and I also tried a solution from this forum, namely to find the recovery file and upload them to https://www.jeffersonscher.com/ffu/scrounger.html -- but they don't contain my old tabs either!

Is there still something I can do to recover my lost tabs??

Earlier today I changed my settings in "Privaty & Security" to "Clear history when Firefox closes". In that setting I selected to only delete "Browsing and download history." I assumed this would just delete my browsing history from the URL bar, but now after I closed Firefox, it also deleted all my tabs!! There were many important tabs that I don't want to lose. But I also can't find them under 'recently closed tabs', and I also tried a solution from this forum, namely to find the recovery file and upload them to https://www.jeffersonscher.com/ffu/scrounger.html -- but they don't contain my old tabs either! Is there still something I can do to recover my lost tabs??

Все ответы (11)

more options

To reopen those tabs, all you have to do is click the Firefox menu button and go to History > Recently closed tabs. In the resulting menu, you'll see a list of the tabs you've recently closed. Click on one of them to reopen it.

Regards, Will

more options

Clearing "Browsing and download history" when you close Firefox is a dangerous setting as that removes the entire sessionstore-backups folder as well (session data is considered history). If you kept the disk cache then your only option is to see in you can find those websites listed on the about:cache page.

If you use the Time Machine or other backup then try to restore sessionstore.jsonlz4 and the sessionstore-backups folder from this backup.

In Mac OS X v10.7 and later, the "~/Library" folder in the Home directory is a hidden folder.

more options

Did the settings change also delete the archival file Firefox created when you installed the Firefox 108.0.1 update? If it wasn't deleted, it would be in the same folder as recovery.jsonlz4 and have a name similar to

upgrade.jsonlz4-20221215175817

It probably would be 2 weeks old now, but might be better than nothing if you don't have a more recent Time Machine backup.

more options

If the sessionstore-backups folder got removed due to using "Clear history when Firefox closes" and created newly then you likely won't have upgrade.jsonlz4 files. The recovery file you found also was likely created newly after restarting Firefox the next time and thus had new session data.

Изменено cor-el

more options

You can possibly use this code in the Browser Console to create a (compressed) sessionstore.jsonlz4 file yourself.


/* Save Session data to .json or .jsonlz4 - 80+ */
var ssj = SessionStore.getBrowserState();
async function writeFile(aFile, ssj){
if(IOUtils){await IOUtils.writeUTF8(aFile,ssj,/lz4$/.test(aFile)?{compress:true}:{compress:false});}
else{await OS.File.writeAtomic(aFile,ssj,/lz4$/.test(aFile)?{compression:"lz4"}:{});}
}
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])}
if (ssj){
 var fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
 fp.init(window, "Save Session", Ci.nsIFilePicker.modeSave);
 fp.appendFilter("JSON Files", "*.json*");
 fp.appendFilter("LZ4 Compressed Files","*.*lz4*");
 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");}
 });
}

more options

jscher2000 - Support Volunteer said

Did the settings change also delete the archival file Firefox created when you installed the Firefox 108.0.1 update? If it wasn't deleted, it would be in the same folder as recovery.jsonlz4 and have a name similar to upgrade.jsonlz4-20221215175817 It probably would be 2 weeks old now, but might be better than nothing if you don't have a more recent Time Machine backup.

Thank you -- sadly, as cor-el suggested, I could only find a version of that file that is, like the other files, created after the 'clearing of history'. I did run it through your website to make sure, but it only contains the tabs I've run and closed since...

more options

cor-el said

Clearing "Browsing and download history" when you close Firefox is a dangerous setting as that removes the entire sessionstore-backups folder as well (session data is considered history). If you kept the disk cache then your only option is to see in you can find those websites listed on the about:cache page. If you use the Time Machine or other backup then try to restore sessionstore.jsonlz4 and the sessionstore-backups folder from this backup. In Mac OS X v10.7 and later, the "~/Library" folder in the Home directory is a hidden folder.

Thank you! Sadly, I've been so stupid not to have my Time Machine or other back-up running. I did try your suggestion and looked in the hidden Library firefox files, but the documents contained in there were not older either.

more options

cor-el said

You can possibly use this code in the Browser Console to create a (compressed) sessionstore.jsonlz4 file yourself.
/* Save Session data to .json or .jsonlz4 - 80+ */
var ssj = SessionStore.getBrowserState();
async function writeFile(aFile, ssj){
if(IOUtils){await IOUtils.writeUTF8(aFile,ssj,/lz4$/.test(aFile)?{compress:true}:{compress:false});}
else{await OS.File.writeAtomic(aFile,ssj,/lz4$/.test(aFile)?{compression:"lz4"}:{});}
}
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])}
if (ssj){
 var fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
 fp.init(window, "Save Session", Ci.nsIFilePicker.modeSave);
 fp.appendFilter("JSON Files", "*.json*");
 fp.appendFilter("LZ4 Compressed Files","*.*lz4*");
 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");}
 });
}


Thank you again! I've just tried doing this, but I feel my computer skills aren't advanced enough. I've accessed the Browser Console, and tried using the web page you linked to, to figure out how to enter that code, but I can't seem to find a way to open the 'command line' to enter any code.

Would this option potentially enable me to recreate data from before the deletion? In that case I'll continue to try finding a way to work with this Console.

more options

Hi Jelle, in order to enable the command line in the browser console, you can use this method:

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

More info on about:config: Configuration Editor for Firefox. The moderators would like us to remind you that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future. Since we have had this setting for a long time and I use it myself, I feel comfortable mentioning it.

(2) In the search box in the page, type or paste devtools.chrome.enabled and pause while the list is filtered

(3) Double-click the devtools.chrome.enabled preference to switch the value from false to true

more options

Thanks again!

I now succeeded in getting to the Browser Console and entering cor-el's code.

I then uploaded the file it created in jscher2000's website, but sadly all URL's it gave me were post-deletion.

Alas.

If someone has another suggestion I'd be happy to hear, but I guess I should now assume the data lost forever. Thanks to both of you nevertheless, appreciate the effort!

more options

To enable the command-line in the console: