Browser view and clear the DNS cache

There dns place, there is the cache. Browsers, operating systems, Local DNS, root name servers, they will do some degree of caching DNS results. This article summarizes some of the common browsers and operating system's DNS cache time

 Browser to check their cache, finding out, is called domain name resolution function library to parse domain name, the domain name to obtain the IP address corresponding to this

DNS query sequence: browser cache → System Cache Cache router → → → ISP DNS cache recursive search

1、chrome:

For faster access, Google Chrome browser uses a withholding DNS record, create a DNS caching method locally, speed up the connection speed of the site. chrome: // net-internals / # dns enlarge DNS cache time for each domain name. chrome 60s will default cache for each domain name.

In the url address bar, enter chrome: // chrome-urls / chrome can see all the configuration interface;

Select the chrome: // dns or chrome: // net-internals / # dns can see the chrome browser dns cache information

Click "Clear host cache" + then select "clear cache" and "flush socket", you can empty the chrome of dns cache

2、firefox:

Configuration meaning:

network.dnsCacheEntries: the number of cache

network.dnsCacheExpiration: dns cache time

network.dnsCacheExpirationGracePeriod: dns cache time is set to 0 means no cache

3, browser handling of DNS resolution results

If the result of the DNS resolution of a domain name have multiple words, the browser is how to deal with it? Chrome browser sends an HTTP request to give priority to the first IP, if blocked, again behind the IP sends an HTTP request

 

4、验证一把:如图,有DNS Lookup、Initial connection(TCP连接)、SSL连接

再次请求,上面的三个过程没有了,因为浏览器有DNS 缓存;TCP长连接还没有断开;SSL连接也还在

 

 如图所示点击“Flush sockets”

三个请求重新发起:DNS查询、TCP三次握手、SSL连接

 

 

Guess you like

Origin www.cnblogs.com/insane-Mr-Li/p/11271619.html