主机文件编辑需要很长时间才能工作?
每当我在 Windows 上的 Hosts 文件中添加条目时,更改需要很长时间才能发生?我已经使用 Firefox 和 IE 进行了测试,似乎需要大约 5 分钟才能识别主机上的新 IP/域条目。
我能做些什么来克服这个问题吗?也许以某种方式“刷新”缓存? ipconfig /flushdns 不起作用。
Whenever I add an entry to the Hosts file on Windows, it takes a long time for the change to take place? I have tested using Firefox and IE and it seems to take around 5 minutes on both of them before the new IP/Domain entry on Hosts is recognised.
Is there anything I can do to overcome this? Perhaps "refreshing" the cache in some way? ipconfig /flushdns doesn't work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
编辑主机文件后,您必须关闭所有浏览器窗口。
(确保所有已处理的 IE 均已退出)。
You have to close all browser windows after you edited the hosts file.
(Make sure all IE processed are quit).
我在主机文件中输入了一个条目。这没有效果。两天后,我尝试了一个实验。我的 Firefox 浏览器缓存接近 500MB 限制。我清空了缓存并立即再次测试了主机文件。它起作用了。
虽然这可能不是所有情况下的解决方案,但它是我的解决方案。
I made an entry into the Host file. It was not effective. Two days later, I tried an experiment. My Firefox browser cache was near its 500MB limit. I emptied the cache and immediately tested the Host file, again. It worked.
While this may not be a solution in all cases, it was in mine.