379

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?

Hennes
  • 65,804
  • 7
  • 115
  • 169

16 Answers16

365
  1. Select the Firefox Menu button (three horizontal lines near the upper right).
  2. Select History.
  3. Select Manage history (at the bottom of the menu).
  4. Search for the site using the Search History field in the upper right corner.
  5. 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.

2nd Method: You could also try something that works on both desktop and Android Firefox:

Click on the padlock in the address bar, then click "Clear cookies and site data...".

zylstra
  • 4,148
47

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.

digitxp
  • 14,884
10

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" Firefox plugin mentioned here before to deal with this. Update: as of 2023 this addon is not available anymore and I was not able to find another that would replace it. :(

See also this bug in Firefox for details and possible progress on this issue.

8

Looks like they might of changed a few things. I found the following:

  1. Menu -> Options
  2. Privacy & Security -> Site Data -> Settings
  3. Highlight the Selected Site and select Remove Selected
  4. Select Save Changes
  5. Finally click Remove

Settings Dialog Remove Selected Dialog Confirmation Dialog

7

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.

Pierz
  • 2,169
5

this addon will allow you view and delete specific cache entries from memory and disk - https://addons.mozilla.org/en-US/firefox/addon/2489/

bryan
  • 8,528
  • 4
  • 30
  • 42
2

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.

private_meta
  • 2,474
2

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.

Synetech
  • 69,547
Sol
  • 31
1

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.

Nantes
  • 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/

user66001
  • 1,319
1

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.
Amir Latifi
  • 157
  • 6
1

I had problem with localhost page which I temporarily changed to https with IIS Express cert, and then when I removed https binding Firefox still wanted to open that page with ssl. So the following worked for me:

  1. Click padlock button near site name
  2. Select "Clear cookies and site data" and confirm

After that, site opened in http, and I didn't lose saved passwords

raiton7
  • 11
0

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).

phuclv
  • 30,396
  • 15
  • 136
  • 260
0

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

yglodt
  • 281
0

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
-1

just open the same page in a firefox "private window" should work to refresh cache for that session and pull new page

brian
  • 1