為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

How to remove only cookies for a specific domain every time i close the browser?

more options

I would like to delete the cookies for 2 domains evry time i close the browser while retaining all other cookies until they expire.

To accomplish this i opened the cookie exceptions settings and set "Allow for Session" under cookie exceptions, but it seems not working the way i expect: if i close the browser and then reopen it if, i find the cookies for the 2 domains are still there.

Is there another way to have this kind of setting.

I would like to delete the cookies for 2 domains evry time i close the browser while retaining all other cookies until they expire. To accomplish this i opened the cookie exceptions settings and set "Allow for Session" under cookie exceptions, but it seems not working the way i expect: if i close the browser and then reopen it if, i find the cookies for the 2 domains are still there. Is there another way to have this kind of setting.

所有回覆 (7)

more options

You can use the Storage Inspector to remove individual cookies for a specific website, via the right-click context menu. To open the Storage Inspector, go to the menu > Web Developer submenu or press Shift + F9 on the keyboard.

more options

HI, please Copy/Paste about:preferences#privacy to the Address Bar and Enter Move down the Page to Cookies and Site Date --> Exceptions and enter the sites as directions state at the top, allow for session.

more options

@Pkshadow This is exactly what i made, but it seems not working. The coockies in marked as allowed for session are not deleted.

more options

Can you try Exit rather than shutdown with the X

more options

Hi ajtim, one situation in which session cookies might reappear is if you restore your previous session windows and tabs. For the open windows and tabs, and up to 3 closed windows and up to 10 closed tabs per window, Firefox will retain the session cookies and some form data in the session history file. This allows you to get back to where you were after a crash. You can try disabling that to see whether it is the source of the cookies.

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

(2) In the search box above the list, type or paste sess and pause while the list is filtered

(3) Double-click the browser.sessionstore.privacy_level preference to display a dialog where you can enter the desired value from the following list, then click OK

  • 0 = save cookies/data for HTTP and HTTPS sites (default)
  • 1 = save cookies/data for HTTP sites, but not HTTPS sites
  • 2 = don't save cookies/data for any site
more options

I made some trials resetting everything from history an setting the exceptions before and after visiting a page for which i want the cookies being removed. I found that:

  • setting allow for session 'in the exceptions before visiting the page for the first time, works as expected and cookies are removed on browser close.
  • setting allow for session in the exceptions after visiting the page does not work is i expect, so the cookies for that page are not removed closing the browser.

Is this a bug or the expecting behaviour.

more options

ajtim said

I made some trials resetting everything from history an setting the exceptions before and after visiting a page for which i want the cookies being removed. I found that:
  • setting allow for session 'in the exceptions before visiting the page for the first time, works as expected and cookies are removed on browser close.
  • setting allow for session in the exceptions after visiting the page does not work is i expect, so the cookies for that page are not removed closing the browser.
Is this a bug or the expecting behaviour.

If Firefox has already stored persistent cookies for the site, you need to remove them yourself. The permission change only affects new cookies the site sets after the change.