How To Clean Chrome's DNS Cache

take 3 minutes to read
Home How To Main article

When doing web development, we often modify the hosts file for testing, but occasionally we find that changing the hosts file does not take effect immediately. This is due to the fact that the browser itself caches the DNS (domain name pointing). In addition to caching, since HTTP 1.1 supports connection reuse, if the page was previously opened, then even if the DNS cache is cleared, the connection will continue to connect to the old domain pointing address again due to reuse. If the connection is multiplexed it will be necessary to manually close the active connection.

View the actual connection address

Viewing the actual connection address can be done through the network panel of the development tool.

Clear cache method

  1. Type in the address bar: chrome://net-internals
  2. Under the DNS tab, click "Clear host cache" to clear the cache.

Method to close active connections

  1. Type in the address bar: chrome://net-internals.
  2. under the Sockets tab, close active connections.

One more way to clear the macOS DNS cache

sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
The Youngest Mobile Player Osom Team Announced Xiaolong 8 + Flagship
« Prev 05-22
The 30 Second Nucleic Acid Sampling Robot Came Out In Shanghai, And The "poke Throat" Is Standardized And Gentle
Next » 05-22