In Firefox, I occasionally need to clear my cache to fix a website. But clearing the entire cache seems like extreme overkill. Is there any way to just clear the one site from my cache?
-
2When I need to debug my site with the Cookie cleaned frequently, I often use the `private browsing mode`. It will clean everything automatically. Hope this can fit your scenario. – smwikipedia Dec 04 '15 at 09:55
15 Answers
- Select the Firefox Menu button (three horizontal lines on the right).
- Select Library.
- Select History.
- Scroll to the bottom and select Show All History.
- Search for the site using the Search History field in the upper-right corner.
- Within the results, right-click the appropriate page and select Forget About This Site.
Note: This will clear saved passwords for the site as well.
- 3,673
- 1
- 18
- 21
-
Looks like we have a winner! I guess this was added somewhat recently? – Ryan C. Thompson Mar 25 '14 at 17:17
-
6You're still here! Three and a half years later. :) To answer you: yep, "yesterday". Thanks for the kudos. – zylstra Mar 26 '14 at 18:52
-
-
6This is a great alternative to CTRL+F5 when you want to remove the cache of a website which redirects you to another website (in which case CTRL+F5 only force refreshes the redirected website). – Sicco Sep 04 '14 at 14:35
-
This also works where I was developing `example.com` on `example.com.preview-service.example.net`. Now it's gone live, Firefox keeps suggesting the preview domain name to me when I start typing. Telling it to forget about the site is a wonderful solution. Thank you. – TRiG Oct 14 '14 at 14:57
-
17A good answer but people need to know about the problem! So: W A R N I N G: This will clear ALL info about that web site including cookie and passwords. – Gabriel Jan 30 '15 at 16:03
-
@Sicco CTRL+F5 was not solving my caché issue with a http to https redirection and yes, delete ALL cache it's so extreme. Would love a direct button with "Clear this". – m3nda May 29 '15 at 19:18
-
4Also, if that site is localhost, it will lose data for all localhost sites that you're developing, which is, for me anyway, far more than I want to clear. – Joshua Frank Jul 03 '15 at 12:41
-
@zylstra Oops, sorry! I tried it again, and removing the site from the history indeed cleared the cache, too. No idea what I did wrong the first time. – Dr. Hans-Peter Störr Sep 29 '15 at 06:31
-
8The question was to delete the site from the browser cache, and not from the history. This answer is bad. – peterh Nov 22 '16 at 11:00
-
@peterh, apparently (from the votes and comments) the answer correctly answers the question, i.e. how to delete a site from the browser's cache. I'd call that a good, rather than bad, answer. – zylstra Nov 24 '16 at 18:49
-
2@zylstra I admit the vote count; which clearly means the answer helped a lot thus it is useful; despite that I can't agree it would be an answer to the original question. Check [this](http://superuser.com/questions/488966/cache-cant-be-cleared-for-a-specific-site-in-firefox?rq=1). – peterh Nov 24 '16 at 22:01
-
Based on my experience with FF so far (from version 40-something up to the nightly build from yesterday), this clears ALL entries in the browser cache (except for a very few particular websites, whose behaviour I have yet to investigate), not just the site that you are trying to forget; so BEWARE! – Janaka Bandara Aug 25 '17 at 18:15
-
1@JoshuaFrank you can mitigate the issue with the use of vhosts on your localhost for different sites you're developing, this should resolve your issue and seems to be more appropriate way of handling the case of developing multiple sites. – tymik Nov 10 '17 at 09:35
-
-
9 years ... 9 years and this is still broken in FF. 9 years and Ctrl-F5 still isn't implemented properly (doesn't work for redirects). 9 years and you still only have the choice "lose everything" or "can't use the web". Sob. – Adam Mar 09 '20 at 15:29
-
2In current Firefoxes, just press `Ctrl + Shift + H` to open the `Library`. – Dmitriy Popov Jul 10 '20 at 13:44
If you want to do a force-refresh, which is what I think you want to do, hit CTRL+F5. And of course, Cmd+F5 on a Mac. Works on Chrome too.
- 14,432
- 9
- 56
- 76
-
4
-
8`CMD` + `SHIFT` + `R` ... the function keys are per default used by OSX. – curly_brackets Oct 17 '11 at 09:32
-
5That's not necessarily true. Resources like html templates are cached every time I'm trying to develop. – James South Apr 02 '12 at 18:19
-
4any idea how to do this for a page that was using a 301 redirect to another domain, but is no longer? I haven't been able to hit ctrl-F5 fast enough, and the redirect keeps happening – matt wilkie Apr 18 '12 at 05:06
-
2This only clears THAT page from the cache. from the cited page above: "To force a reload of everything on the page,...use the hotkey combination Ctrl-F5." – Clay Nichols Dec 28 '12 at 19:45
-
1To clarify what Clay is saying, the problem with CTRL+F5 is that it only forces a refresh of that particular page and the resources it links to (with ``, not ``). That leaves every other page on the site potentially out of step with the CSS and JS that you might just have refreshed. – Lawrence Dol Feb 09 '13 at 02:01
-
1
-
27Don't understand why this answer get's upvoted so much as it's both wrong and doesn't answer the question. Ajax calls, css files, redirects keep being cached (or redirects). The only sure way would be an option to remove history from a certain domain like with removing cookies. Another way is to start firefox with a different (cleaned) profile. – HMR Sep 15 '13 at 03:18
-
2@matt — Try with turning on the warning before redirect, in the Prefs → Advanced → General → Accessibility. But this pref does not work in all cases. – Nicolas Barbulesco Apr 27 '14 at 07:11
-
@HMR it get's upvotes because it makes the browser re request the cashed assets while not erasing the passwords and cookies of the website. – Accountant م Aug 18 '18 at 15:43
-
Please note that there is currently no way to clear cached HTTP redirects (at least 301 type) without using a plugin.
Ctrl+F5 / Cmd+F5 does not work as you are being immediately redirected to the target URL so you can not refresh the original one.
So I used CacheViewer plugin mentioned here before to deal with this.
See also this bug in Firefox for details and possible progress on this issue.
- 335
- 3
- 10
-
You may try with turning on the warning before redirect, in the Prefs → Advanced → General → Accessibility. But this pref does not work in all cases. – Nicolas Barbulesco Apr 27 '14 at 07:13
-
1I wonder if that Firefox bug isn't simply about 301 Moved Permanently redirects, which are, well, *designed* to be permanent. If Firefox would indeed cache 302 Found, then that would indeed be a bug. – Arjan Jul 24 '15 at 07:13
-
You are generally right about 301 @Arjan but I would say it's at least a questionable behaviour to cache a redirect resulting in 4xx/5xx response. And also not being able to clear these redirects cache without a third-party tool seems to be more like a bug than a lack of a feature.. – Greg Dubicki Jul 24 '15 at 13:12
this addon will allow you view and delete specific cache entries from memory and disk - https://addons.mozilla.org/en-US/firefox/addon/2489/
- 8,400
- 4
- 28
- 41
-
5
-
3Have a look at this https://addons.mozilla.org/de/firefox/addon/cacheviewer2/ – iceteea Dec 03 '13 at 10:25
-
-
Apparently, this add-on cannot be hot-installed. This is too bad. I need to make some specific sites work again in Firefox, without relaunching Firefox. – Nicolas Barbulesco Apr 27 '14 at 06:52
-
@iceteea — This add-on CacheViewer2 is not in stable version. And, apparently, this add-on cannot be hot-installed. This is too bad. I need to make some specific sites work again in Firefox, without relaunching Firefox. – Nicolas Barbulesco Apr 27 '14 at 06:54
-
@iceteea — Apparently, this add-on CacheViewer2 does not delete cache entries, but only allows the user to view and save them. – Nicolas Barbulesco Apr 27 '14 at 06:55
-
CacheViewer2 does indeed delete cache entries as of version 1.7.2.1-signed, and perhaps earlier. – SouthwindCG Mar 12 '16 at 06:50
-
Another approach would be to use Firefox's containers - create a fresh container tab/window using (using a container add-on e.g. Temporary containers, or Mozilla's Multi-account container add-on) and load your site in that container - a fresh/temporary container will have empty login, cache etc so will act like you've cleared these.
- 1,869
- 21
- 15
Looks like they might of changed a few things. I found the following:
- Menu -> Options
- Privacy & Security -> Site Data -> Settings
- Highlight the Selected Site and select Remove Selected
- Select Save Changes
- Finally click Remove
- 193
- 6
-
I could be wrong but it looks like this option only selects sites that have stored temporary data. For ***those*** sites, yes, it clears cookies and everything else. For a site that has ***not*** stored temporary data, it doesn't appear in the list so you can't just clear cookies. However! If you Clear All Data, it does get all sites somehow. Ugh - as I just did while entering this text. I think this specific feature needs some more testing. – TonyG Feb 19 '18 at 20:53
-
There is no built in way to clear the cache of specific pages/sites in Firefox. You can "Forget about this site" which cleans the domain from history, you can "Delete this page" which cleans the specific page from history, but you can't clean up single cache items belonging to a page (apart from going to your profile folder and deleting them).
There may be addons to do this, but I didn't find anything when looking through them. Built-In functionality for cache deletion seems to have the all-or-nothing policy.
- 2,474
- 5
- 27
- 38
-
2Where are the options you mentioned for "Forget about this site" and "Delete this page"? – Mar Jun 20 '12 at 17:16
-
-
@mouseas Those two commands are at the bottom of the right-click menu of any individual page in history, in the History window or sidebar. – Rory O'Kane Jul 18 '13 at 19:18
One day when you have not opened anything else, go to Tools ⇨ Clear recent history and then select to only clear the cache and then only from today or Xtime. Because you just visited the website, it should have moved its timestamps in the cache to the top of the list so you can just wipe all cache from Firefox for that day and thus clear the cache for your specific website.
I'm kinda late to the party here, but I wanted to leave this answer for people who found this thread through googling like I did. The problem was solved for me by accessing Firefox's profile selector (Windows -> Run -> "Firefox.exe -p"), using a new profile and visiting the website from there. Then when I went back to my regular profile, the website began working normally again! Opening it on the other profile must have refreshed my regular profile's cache with non-corrupt versions of the files.
- 11
- 1
In what seems to be a just released Firefox extension, the original question now has an answer which is both a direct solution to the problem posed (not how to also remove cookies, passwords, etc from the selected domain which happens through the use of "Forget about this site") and will handle websites which utilise a page redirect rather than a page content change that is undesirably cached. Great design also. Quick and efficient.
https://addons.mozilla.org/en-US/firefox/addon/clear-site-cache/
- 1,228
- 3
- 14
- 26
-
2
-
1
-
@kmoser - Considering it wasn't compatible with a version of Firefox from 2018, doesn't surprise me that it is no longer available. Disappointing. – user66001 Jul 08 '21 at 17:50
There's a similar question and answers shortly are:
- You can use Firefox by 2 profiles.
- There's a extension named CookieMonster may works for you.
- There are two add-ons for FF that every web developer needs and they are Web Developer Toolbar and Firebug, the Firebug extension YSlow comes in very handy too.
Web Developer Toolbar has great cache and cookie control down to individual cookies. - Ctrl-F5 is enough usually.
- 157
- 6
-
6Those are mostly for cookies. I just care about dropping a domain from cache. – Ryan C. Thompson Aug 07 '10 at 20:54
-
1Thank you for this summary. But Cookie Monster is not a cookie. Cookie Monster is an extension for Firefox. – Nicolas Barbulesco Apr 27 '14 at 07:00
-
If you know the exact list of URLs that you need to clear from the cache (e.g. the corrupted CSS entry/ies from the site in question), you can clear them using this script (adapted from DoomEntry.js; needs to be run on the Browser Console (Ctrl+Shift+J), not the Web Console (Ctrl+Shift+K):
// load the disk cache
var cacheservice = Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
.getService(Components.interfaces.nsICacheStorageService);
var {LoadContextInfo} = Components.utils.import("resource://gre/modules/LoadContextInfo.jsm",{})
var hdcache = cacheservice.diskCacheStorage(LoadContextInfo.default, true);
// compose the URL and submit it for dooming
var uri = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService).newURI(prompt("Enter the URL to kick out:"), null, null);
hdcache.asyncDoomURI(uri, null, null);
Simply run the script with each URL that you need to purge (or make up a loop... you know the drill).
Theoretically this should clear cached AJAX responses, other asynchronously loaded resources, and 301 redirect entries as well (as long as you enter the original (pre-301) URL).
- 26,555
- 15
- 113
- 235
- 280
- 1
- 2
- 13
-
EDIT: since FF 60, lines 2-3 should be replaced with `var hdcache = cacheservice.diskCacheStorage(Services.loadContextInfo.default, true);`; kudos to https://bugzilla.mozilla.org/show_bug.cgi?id=1417937. (For some reason I'm not allowed to edit my original answer.) – Janaka Bandara Apr 01 '18 at 10:47
While not removing all the site data, this handy addon will remove the cookies for the current site:
https://addons.mozilla.org/firefox/addon/remove-site-cookies
- 251
- 3
- 9
Clear Browsing Data is a recommended Firefox extension which enables you to delete browsing data, such as cookies, history and cache, directly from the browser toolbar. The toolbar button can be configured to clear all browsing data with a single click, or to show a list of data types available for clearing.
Supported data types:
Cookies
Browsing history
Cached images and files
Autofill form data
Download history
Service Workers
Plugin data
Saved passwords
IndexedDB data
Local storage data
- 139
- 1
- 2
- 10
just open the same page in a firefox "private window" should work to refresh cache for that session and pull new page
- 1


