Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable DNS caching in Safari?

I'd like to disable Safari on Mac OS X from performing DNS caching.
Is there a way to do that through configuration or any other setting ?

like image 238
Guy Avatar asked Dec 16 '22 20:12

Guy


2 Answers

Clear the OS cache:

sudo killall -HUP mDNSResponder

Disable Safari DNS prefetching:

defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean false
like image 172
Alexandre Jacques Avatar answered Dec 26 '22 17:12

Alexandre Jacques


Update: for Yosemite to clear the cache you want:

sudo discoveryutil udnsflushcaches
like image 40
Jas Avatar answered Dec 26 '22 16:12

Jas