如何从特定站点删除 cookie?

mat*_*v27 14 firefox

这个问题询问如何删除所有Firefox cookie 和缓存,但我需要从特定站点删除 cookie。我该怎么做?

dig*_*kid 18

转到首选项->隐私和安全-> Cookie 和站点数据,然后单击管理数据按钮,然后搜索该站点。单击要选择的站点,然后单击Remove Selected,然后单击Save Changes

这就是你需要做的。


pLu*_*umo 10

您可以使用sqlite3删除从终端饼干(必要时安装:sudo apt install sqlite3

sqlite3 ~/.mozilla/firefox/*.default/cookies.sqlite \
'delete from moz_cookies where baseDomain="example.com";'
Run Code Online (Sandbox Code Playgroud)

或者

sqlite3 ~/.mozilla/firefox/*.default/cookies.sqlite \
'delete from moz_cookies where baseDomain LIKE "%google.%";'
Run Code Online (Sandbox Code Playgroud)

要删除特定站点的历史记录:

sqlite3 ~/.mozilla/firefox/*.default/places.sqlite \
'
delete from moz_historyvisits where place_id in (select h.place_id from moz_historyvisits h join moz_places p on h.place_id = p.id where p.url like "%example.com/%");
delete from moz_places where url like "%example.com/%";
'
Run Code Online (Sandbox Code Playgroud)

还有一些更有趣的表,您可能需要从 eg 中删除moz_originsmoz_bookmarks或者moz_bookmarks_deleted从域中删除更多路径。


注意:必须关闭 Firefox,否则您将看到错误消息:

Error: database is locked
Run Code Online (Sandbox Code Playgroud)

  • 它保存在 place.sqlite 中,但这有点复杂,您需要连接两个表。我添加了如何做。 (2认同)