This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How do I restore deleted browsing history and cookies?

more options

I have Firefox 56 and Windows 7. My computer froze while Firefox and the Library were open and I had to force restart. My browsing history and bookmarks were completely deleted. I restored my bookmarks from a backup, but that didn't restore my browsing history. That history is EXTREMELY important -- I can't bookmark every website I visit, so I need history to return to a site I visited before.

A few days ago I made a copy of my entire Firefox folder from C:/Users/Ellen/AppData/Roaming/Mozilla. Where in that do I find my browsing history and where do I copy them to? I already tried copying the places.sqlite and prefs.js files from the copy into my actual profile but that didn't restore anything that I can see.

At the same time as making that copy, I installed FF56 to replace FF57, so I might have a restore point from then.

I have Firefox 56 and Windows 7. My computer froze while Firefox and the Library were open and I had to force restart. My browsing history and bookmarks were completely deleted. I restored my bookmarks from a backup, but that didn't restore my browsing history. That history is EXTREMELY important -- I can't bookmark every website I visit, so I need history to return to a site I visited before. A few days ago I made a copy of my entire Firefox folder from C:/Users/Ellen/AppData/Roaming/Mozilla. Where in that do I find my browsing history and where do I copy them to? I already tried copying the places.sqlite and prefs.js files from the copy into my actual profile but that didn't restore anything that I can see. At the same time as making that copy, I installed FF56 to replace FF57, so I might have a restore point from then.

Modified by Ellen.

Chosen solution

Hi Ellen:

Troubleshooting Information page

  • Troubleshooting Information is a page in Firefox
  • You only need one of the methods to open the page
  • The "Open Folder" button should open the folder you already know about

I am not familiar with "classic" folders, but that probably involves the appearance of windows and not their paths.

Since as you point out the profile names are partially randomized, I can't give you the specific paths. You can associate:

OLD PROFILE FOLDER:

This is where you copy places.sqlite from.

CURRENT PROFILE FOLDER:

This is where you rename places.sqlite and remove the two journaling files if you find them. While Firefox is fully closed.

Read this answer in context 👍 2

All Replies (12)

more options

Firefox was not running when I made my backup Profile folder.

I had cleared my cache (twice), but when I (temporarily) restore history to my Normal profile, the icon-images still appear in the history (before it is deleted). So I don't think they are in the cache.

Checking on my Normal Profile, Firefox is set to:

Remember my browsing and download history Remember search and form history Accept cookies from websites Clear history when Firefox closes

I do not know why the last is clicked because I would never voluntarily, deliberatly click it. I do not know how or when it was reset to do that. I will try undoing it and re-copying the old copied History again. I will also go into the Clear History settings and uncheck everything inside, incase something reverts it to Clear History again.

I had thought that "Remember my browsing and download history" would make "Clear History" unavailable or uncheck it or something.


EDIT: It is keeping the history this time when I close and reopen Firefox. Now I will try... restarting WIndows...

EDIT 2: I closed FF and restarted Windows, and started FF in Normal Profile, and if has my history there still. So maybe it will stay stable now! Yay!

Thank you both so, so much for your patience and help and detailed instructions. I am so grateful!

Modified by Ellen.

more options

Website favicon images are stored in a separate SQLite database named favicons.sqlite in the profile folder, so best is to restore this file as well (places.sqlite and favicons.sqlite).

more options

That restored the icons, thank you! The history urls appear to be stable...

Now that I look at them, my cookies were also deleted. And probably lots else, judging by what the default Clear History setting is.

So should I also copy these?

content-prefs.sqlite cookies.sqlite cookies.sqlite-shm (if present) cookies.sqlite-wal (if present) favicons.sqlite-shm (if present) favicons.sqlite-wal (if present) formhistory.sqlite permissions.sqlite places.sqlite-shm (if present) places.sqlite-wal (if present) search.sqlite storage.sqlite

Modified by Ellen.

more options

SQLite temp files (.sqlite-shm and .sqlite-wal) are probably best left out and if corresponding files exist when you replace a .sqlite file then these temp files should be removed.

The search.sqlite file is no longer used and is replaced by the compressed search.json.mozlz4 file.

  • content-prefs.sqlite : stores some Site Preferences
  • cookies.sqlite : stores cookies
  • favicons.sqlite : stores favicon data (bookmarks and history)
  • formhistory.sqlite : stores saved form (autocomplete) data
  • permissions.sqlite : stores permissions (see Tools -> Page Info -> Permissions)
  • storage.sqlite : not sure what this file is used for, so use with care as it might be related to the Storage folder

Note that logins.json and key3.db are used to store the usernames and passwords. There are other files in JSON format that store data (.json or .jsonlz4 or .mozlz4).

more options

OK I think that's everything I needed to get back.

Thank you so, so much jscher2000 and cor-el for basically spending all day helping me!

more options

You're welcome

more options

Before Firefox 57, I had an add-on called “Toggle Link Visited” that I used to un-visit a link & change the link color back to blue. This was handy for keeping track of links that I wanted to return to by keeping them purple.

I can’t find a similar add-on for FF57 that works.

So I was experimenting by deleting some of the urls locations in History. Initially this appeared to work. No history of a link therefore no purple color. Not sure what I did but it wiped out all the purple links/threads in a forum. IOW all my reference threads are now unmarked.

I restored Windows back a few days but it made no difference. So I un-restored back to today.

Since I haven’t found an add-on that works with FF57, is there a way to change a link’s color back to blue, just like I never was there?

More importantly, where is the “links visited” information stored & is it possible that Windows 7 keeps a backup copy somewhere?

more options

Mike109 said

Before Firefox 57, I had an add-on called “Toggle Link Visited” that I used to un-visit a link & change the link color back to blue. This was handy for keeping track of links that I wanted to return to by keeping them purple. I can’t find a similar add-on for FF57 that works.

I use this one, which integrates with the right-click context menu on links in a page: https://addons.mozilla.org/firefox/addon/link-visitor-5/

So I was experimenting by deleting some of the urls locations in History. Initially this appeared to work. No history of a link therefore no purple color. Not sure what I did but it wiped out all the purple links/threads in a forum. IOW all my reference threads are now unmarked.

Normally Firefox relies on history to mark a link as visited, so no visits to that URL in history, you get the "unvisited" color.

But you suddenly had the "univisited" color for ALL links on the site? If you were right-clicking links and using Delete Page, there is a very dangerous command immediately below that called Forget About This Site. That will clear ALL history for the site, cookies, bookmarks, permissions, basically everything Firefox has stored for that site. So... that could explain the problem. For deleting URLs from history, I suggest using the Delete key on the keyboard instead.

As for whether that history is recoverable, it seems doubtful. Firefox doesn't make backups, and if you already tried the last restore point, that probably was the best shot.

more options

Previously I tried that Link Visitor but it did not do anything when I went to unvisit a link. I'll try it again.

IIRC I did click on Forget About This Site & thought it would forget about the link I clicked on, not all the links in the whole forum.

update - I just tried Link Visitor again. Right clicked on a purple link, toggled the state, & it stayed purple. Even closed out of FF & came back in & the link was still purple.

Modified by Mike109

more options

Mike109 said

update - I just tried Link Visitor again. Right clicked on a purple link, toggled the state, & it stayed purple. Even closed out of FF & came back in & the link was still purple.

Mine goes blue if I reload the page after using "Toggle visited state". I don't know why it isn't working well for you. (I usually use it to visit links rather than unvisit them. In that case, you don't need to reload the page.)

more options

What does Link Visitor do in order to un-visit a link? Does it just look at the history & delete the URL?

If I go into history & delete the url using the Delete key on the keyboard as you mentioned, would I be doing the same exact thing that Link Visitor is doing? Or suppose to be doing in my case.

more options

Mike109 said

What does Link Visitor do in order to un-visit a link? Does it just look at the history & delete the URL? If I go into history & delete the url using the Delete key on the keyboard as you mentioned, would I be doing the same exact thing that Link Visitor is doing? Or suppose to be doing in my case.

I assume that is what it does but I haven't opened it up to see how the code works.

  1. 1
  2. 2