Doing web development on my local machine — a Vista box — I was wondering why page rendering was so slow. First I thought my web application was badly done. But then I noticed the pages rendered lightning fast on IE 7, and later that the same application rendered pretty fast in Firefox too once published to the live server. So it wasn’t the app — something about talking to localhost specifically was stalling Firefox.
After some research, the fix back in 2008 was a single about:config change: setting network.dns.disableIPv6 to true did the trick.
What was actually happening
Vista resolved the name localhost to both 127.0.0.1 and ::1. Firefox preferred the IPv6 address and tried it first; if the local dev server was only listening on IPv4, the browser sat through a connection timeout before falling back. Disabling IPv6 lookups removed the stall — the same root cause explains why this bit Chrome users on Windows 7 a couple of years later.
The modern equivalent
The IPv6/IPv4 mismatch still bites developers today, just in reverse: modern dev servers often bind to ::1 or :: (both stacks) while tooling connects to 127.0.0.1, or the hosts file resolves localhost to the wrong family. In order of preference:
- Use
http://127.0.0.1:PORTinstead ofhttp://localhost:PORT— no name resolution involved, nothing to get wrong. - Make the dev server listen on both stacks (bind to
::with dual-stack enabled, or listen on0.0.0.0and::explicitly). Most modern frameworks do this by default. - Fix the hosts file if it maps
localhostto only one address family. - The old sledgehammer still exists:
network.dns.disableIPv6 = trueinabout:configis still a valid Firefox preference in 2026, but disabling IPv6 globally to fix a localhost quirk is overkill — keep it as a diagnostic, not a lifestyle.
Original source (2008): codepoetry — the original blog entry I found this in is long gone, but the site itself is still alive.