Firefox won't navigate to site on localhost when internet connection is broken

2

I am serving a website from localhost, my /etc/hosts contains

127.0.0.1 foo.com

If I navigate to foo.com in Firefox, the site works...

...unless the Internet connection is down, then Firefox won't navigate to foo.com, it will report Server not found.

Other software (ping, elinks) can reach foo.com regardless.

How can I make Firefox realise it can still connect to localhost?

spraff

Posted 2016-12-23T23:02:45.317

Reputation: 1 238

what version of firefox are you using? See https://bugzilla.mozilla.org/show_bug.cgi?id=967792. Seems there was a key added (network.dns.offline-localhost) to fix that issue, but it looks like it was added a while back. If you're on a really old version of firefox, try updating (or if on newer version, check that key in about:config).

– MaQleod – 2016-12-24T06:26:36.983

No answers