View and Restore Firefox Cache Files
In this article
To view and restore Firefox cache files, you can use the built-in about:cache page to inspect cached entries, or copy files from the cache directory after closing Firefox. This guide explains both methods, how to recover specific files, and how to manage the cache safely.
What the Firefox Cache Is
Firefox stores copies of web resources (images, scripts, stylesheets, and sometimes full pages) in a cache directory on your hard drive. This speeds up browsing by loading previously visited content from disk instead of downloading it again. The cache is not a simple folder of files with original names—it uses a structured format with metadata and hashed filenames.
There are two main cache types in modern Firefox:
- Memory cache – stores data in RAM, lost when the browser closes.
- Disk cache – persists on disk, located in your profile folder under
cache2(for HTTP cache) andstorage(for web storage like IndexedDB).
You cannot simply open the cache folder and see recognizable files like image.jpg or page.html. The browser renames entries with a hash and stores metadata separately. To extract a usable file, you need to use the built-in debug tool or third-party utilities.
How to View Cache Entries
Firefox provides a hidden page that lists all cached entries. Follow these steps:
- Type
about:cachein the address bar and press Enter. - You will see three sections: Memory cache device, Disk cache device, and Offline cache device.
- Click List Cache Entries under the disk cache to see a table of all cached URLs, sizes, and last modified times.
- Click any URL to view its headers and content (if it is text-based).
This page is for inspection only—it does not offer a “save as” button. To actually restore a file, you need to copy it from the disk cache manually or use a dedicated tool.
Where the Cache Is Stored
The disk cache lives inside your Firefox profile folder. To find it:
- Click the menu button (☰) and select Help > More Troubleshooting Information.
- Under Application Basics, find Profile Folder and click Open Folder (Windows) or Show in Finder (macOS).
- In the profile folder, open the
cache2directory. Inside you’ll see subdirectories namedentriesandindex.
The entries folder contains the actual cached data files, but they have no file extensions and are named with random strings. To identify which file corresponds to a URL, you must cross-reference with the index or use a tool.
How to Restore a Specific File
If you need to recover a specific image or document that you once viewed, follow these steps:
- Close Firefox completely (so the cache is not locked).
- Open
about:cachebefore closing and note the URL and the “Key” (which is the hash used as filename). - Navigate to
cache2/entriesand find the file with that exact name. - Copy the file to a safe location.
- Add the correct file extension based on its content type (e.g., .jpg, .png, .html).
For example, if the entry shows https://example.com/photo.jpg and the key is ABC123, you’ll find a file named ABC123 in the entries folder. Copying it and renaming it to photo.jpg will give you a usable image.
However, this method works only if you know the exact key. For bulk recovery, use a third-party tool like MozillaCacheView (Windows) or cache2view (cross-platform), which reads the index and lets you export entries with proper names and extensions.
Common Problems and Misconceptions
Many users believe that clearing the cache deletes all browsing data permanently. In reality, clearing the cache only removes the cached files; your browsing history, cookies, and saved passwords remain unless you clear those separately. Another misconception is that the cache contains full copies of every page you visited—in fact, many pages are stored as fragments and may not be reconstructable.
A frequent issue is that cached files are locked or corrupted. If Firefox is running, the cache files are in use, and copying them may fail. Always close Firefox first. If you encounter corrupt entries, you can safely delete the entire cache2 folder—Firefox will recreate it automatically.
Safety and Privacy Considerations
The cache can contain sensitive data, such as login pages, private documents, or personal images. If you share your computer, anyone with access to your profile folder can potentially view these files. To protect your privacy:
- Clear your cache regularly via Settings > Privacy & Security > Cookies and Site Data > Clear Data.
- Use Firefox’s Private Browsing mode, which stores minimal cache data and clears it when you close the window.
- If you are restoring a file for legitimate purposes (e.g., recovering a lost download), be aware that the cache may not have the original file if it was streamed or dynamically generated.
Never attempt to restore cache files to bypass digital rights management (DRM) or to access content you are not authorized to use. This guide is for personal data recovery and troubleshooting only.
Alternatives to Cache Recovery
If you are trying to recover a file that was deleted from your system, the cache is often the last resort. However, there are better alternatives depending on your goal:
- Downloads folder – Check if the file was saved to your default download location.
- Browser history – Revisit the page and download the file again.
- Wayback Machine – For publicly available web pages, use the Internet Archive to retrieve an older version.
- File recovery software – If the file was on your disk but deleted, use dedicated recovery tools (but note that they are not guaranteed to work).
These methods are often simpler and more reliable than digging through the cache.
Frequently Asked Questions
Can I recover a deleted cache file?
If you have already cleared the cache or deleted the profile folder, the files are gone. However, if you only deleted a single file from the entries folder, you might recover it with file recovery software, but the chance is low because the browser may overwrite that space.
Why do cached files have no extension?
Firefox stores cache entries without extensions to prevent accidental execution and to save space. The file type is stored in the metadata, which is why you need a tool or the about:cache page to identify the correct extension.
Is it safe to delete the cache folder manually?
Yes. Deleting the cache2 folder while Firefox is closed is safe. Firefox will recreate it on the next launch. You may lose some cached data, but your bookmarks, passwords, and history are unaffected.
Can I view cached pages offline?
Sometimes. If a page was fully cached, you can open it from the cache using a tool like MozillaCacheView and view it in a browser. However, many modern pages require server-side data and will not render correctly offline.
Does Private Browsing use the cache?
Private Browsing uses a temporary memory cache that is cleared when you close the window. It does not write to the disk cache, so no files are stored on your hard drive.