jeudi 11 juillet 2019

How to flush the DNS cache of Safari on macOS Mojave without restarting the system?

I've experimenting with configuring dnsmasq on macOS for Apache vhosts instead of creating entries in /etc/resolver/<domain> for each domain. In my case, I configured dnsmasq to resolve .dev to localhost.

Since Safari had previously visited foo.dev, it kept requesting that page, although dig resolved foo.dev to localhost.

It didn't help to clear Safari's web cache and flush the system's DNS cache:

sudo dscacheutil -flushcache

It was first after a reboot that Safari properly visited the localhost instance of foo.dev (vhost).

So, is Safari mantaining its own DNS cache - and if so, how can it be flushed without restarting the system?




Aucun commentaire:

Enregistrer un commentaire