I am developing a website on localhost with the following entry in my hosts file:
That IP is coming from a Vagrant provisioned VM hosted in Virtualbox.
Whenever I try to load the site in Firefox, it takes about 3-4 seconds before it is able to resolve the domain. I see
looking up mysite.local in the lower left of Firefox for a while, then it loads the site quickly. Each subsequent lookup happens quickly as if it has cached that DNS lookup,
However, if I let the site go idle for about 5 minutes, the lookup is slow again.
Chrome and Safari do not have this problem. They both always resolve the domain quickly, even from a cold start. Firefox is the only one that struggles with it.
What can I do to troubleshoot what might be causing this problem in Firefox?
EDIT: It looks like Firefox caches DNS lookups for 60 seconds (according to
about:config, which explains why the site is resolved quickly if I continually use it, but goes back to being slow if I let it sit idle. So the question then becomes, why is only Firefox having trouble resolving it when it's not cached?