Firefox 使 dns 缓存失效 [英] Firefox invalidate dns cache
问题描述
我访问我在客户服务器上设置的站点的速度太快了,Firefox 现在记住了(示例)的默认站点
I was too quick about visiting a site I set up on a customer server, and Firefox now remembers, that the default site for (example)
testsite.mycompanyname.com (non existing subdomain, same as *.mycompanyname.com)
是
www.mycompanyname.dk - or rather the IP of the default server
我后来设置了公共 DNS(a-record)以重定向到另一台服务器,但 Firefox 会记住默认 IP 地址.
I have then later set up the public DNS (a-record) to redirect to another server, but Firefox remembers the default IP adress.
Chrome/IE/Safari - 没问题,因为他们在 DNS 启动之前没有访问过那个网站......
Chrome/IE/Safari - no problem, as they have not visited that site before DNS kicked in...
我在 about:config 中设置了这些:
I have set these in about:config:
network.dns.disablePrefetch = true
network.dnsCacheExpiration = 0
还有什么吗?
我真的需要 firebug 来调试那个站点的前端......
I really need firebug to debug the frontend on that site....
干杯
推荐答案
DNS 缓存发生在多个级别:应用程序询问本地系统,它要求本地配置的解析 DNS 服务器,询问权威 DNS 服务器.
DNS caching occurs at multiple levels: Application asks local system, which asks locally configured resolving DNS server, which asks authoritative DNS servers.
- 我发现 Firefox 可以退出并重新启动.
about:config
中的相关设置为network.dnsCacheEntries
和network.dnsCacheExpiration
,可以设置为0
以禁用缓存.
- I've found for Firefox that quitting and restarting works. The relevant settings in
about:config
arenetwork.dnsCacheEntries
andnetwork.dnsCacheExpiration
, which can be set to0
in order to disable caching.
- 诊断:ping 和其他应用程序一样,使用本地系统 DNS 缓存
- 刷新 MacOsX 10.8:
sudo killall -HUP mDNSResponder
(参考)
(其他版本可能有所不同) - 刷新 Windows:
ipconfig/flushdns
(仅当启用了 DNS 缓存服务HKLMSYSTEMCurrentControlSetServicesDnscache
时;检查netstart|findstr/i dns
或compmgmt.msc
) - Linux/Unix 可以使用
nscd
(名称服务缓存守护进程)或dnsmasq
,或两者都使用 ...
- Diagnostic: ping, like other applications, uses local system DNS cache
- Flush MacOsX 10.8:
sudo killall -HUP mDNSResponder
(reference)
(May vary for other versions) - Flush Windows:
ipconfig /flushdns
(only if the DNS caching service,HKLMSYSTEMCurrentControlSetServicesDnscache
, is enabled; check withnet start|findstr /i dns
orcompmgmt.msc
) - Linux/Unix may use
nscd
(name services caching daemon), ordnsmasq
, or both ...
- 诊断:
nslookup
首先报告解析服务器的地址,然后是请求的地址. - 刷新绑定:
rndc flush
orrndc flushname DOMAIN.NAME
- Diagnostic:
nslookup
first reports address of resolving server, then address requested. - Flush BIND:
rndc flush
orrndc flushname DOMAIN.NAME
TTL 代表生存时间"这一术语,用于描述请求客户端或服务器认为 DNS 记录有效的时间.较短的 TTL 意味着请求者被告知不要将 DNS 查找缓存太久.TTL 的范围可以从几秒(例如 DynDNS 和类似的)到几天或几周.
TTL stands for "time to live" a term used to describe how long a DNS record is to be deemed valid by the requesting client or server. A short TTL means that the requester is told not to cache a DNS lookup for too long. The TTL can range from mere seconds (e.g. for DynDNS and similar) to days or weeks.
这篇关于Firefox 使 dns 缓存失效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!