Reputation: 17898
Having the latest stable Firefox (69.0.2) on Ubuntu 19.04, I realized that FF has its own DNS cache: After applying DNS changes to the DNS server, I purged the systemd-resolved cache like described here. This worked on multiple cli-tools like dig
, curl
and ping
, so the system-wide DNS cache should be purged. But Firefox still got the old DNS record.
This questions brings me to network.dnsCacheExpiration
. According to the Mozilla documentation, this is the duration in seconds for caching DNS entries. Default is 60 and my about:config
also shows that 60 is set. However, I updated the DNS record half an hour ago and it's still the old one.
For testing purpose, I also tried it on a Windows 10 test machine with the same Firefox version. Surprisingly, the DNS changes were applied immediately and it also has network.dnsCacheExpiration
set to 60.
Why is the DNS cache from Firefox not purged after 60 seconds on the Ubuntu machine? Is it a problem of the OS, altouth multiple cli-tools got the new entry?
Upvotes: 4
Views: 1588
Reputation: 104
Even though this question is stale, I found very little on the topic searching the web that was helpful. I noticed the same thing that Lion's question outlined, and tried numerous settings that were not successful, such as:
I found the bugzilla tickets below, which while not directly answering the question, did deal with a related issue with the hosts file not being honored:
The tickets also were not very helpful in their analysis. I did however find three workarounds that worked for me (and hopefully it may help others as well):
To clear Firefox's DNS cache manually:
To get the DNS cache to work decently with a particular domain:
To disable Firefox's DNS cache (force it to always resolve without using DNS cache - has a performance impact):
Upvotes: 4