当我更改 /etc/hosts
文件时,Mozilla Firefox 会忽略这些更改。
例如,我使用 0.0.0.0 facebook.com
来禁止 Facebook。这在 Chromium 中或当我尝试从终端 ping 它时完美运行。但无论我做什么,Firefox 总是显示 Facebook。
我尝试过的:
- 重新启动 Firefox/重新启动系统
/etc/init.d/networking restart
- 在浏览器的
about:config
中将network.dnsCacheExpiration
设置为 0 - 重新启动 nscd
- 使用 DNS Flusher 插件 - 完全没有效果
- 根据this answer编辑
/etc/nsswitch.conf
chmod 0644/etc/hosts
根据 this answer- 以及我通过谷歌搜索在结果的前 3 页中找到的所有其他内容
还有其他想法吗?我相信这是由 Firefox 缓存 DNS 引起的,但我不知道如何清除它。任何其他浏览器/客户端根据 /etc/hosts
运行。非常感谢!
最佳答案
您是否尝试过 Firefox 中的“忘记此站点”选项?
You can remove all data stored in Firefox from a specific domain via "Forget About This Site" in the right-click context menu of an history entry ("History > Show All History" or "View > Sidebar > History") or via the about:permissions page.
Using "Forget About This Site" will remove all data stored in Firefox from that domain like bookmarks, cookies, passwords, cache, history, and exceptions, so be cautious and if you have a password or other data from that domain that you do not want to lose then make sure to backup this data or make a note.
https://support.mozilla.org/en-US/questions/1015370#answer-615732
当 Firefox 缓存不再存在的 URL 重定向时,这为我解决了一个问题。
关于linux - 在 Linux Mint 17.1 上清除 Firefox Developer Edition DNS 缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28195831/