I'm developing websites in a Windows 7 machine.
When I've installed Firefox I've found some performance issue specially on connecting to the localhost, googling around I've discovered that it's related to the use of IPv6 by the browser to resolve urls.
Using about: config and setting network.dns.disableIPv6 to true the problem is gone.
Now I've the same issue with Google Chrome, but I can't find a way (if there's a way) to do the same I've done with Firefox.
Any suggestions?
24 Answers
From:
Edit your "hosts" file on your computer to make sure there is an ipv4 style localhost entry there. Go to:
C:\Windows\System32\drivers\etc\hostsMake sure there is a line that looks like
127.0.0.1 localhostAnd make sure the line with the ipv6 style is commented out (with #)
# ::1 localhostYou'll have to run your editor w/ admin mode to be able to save the changes. I had this problem before and this change fixed it for me. It doesn't disable ipv6 on your computer, it just tells it to use ipv4 for localhost lookups.
5Start Chrome with the command line flag --disable-ipv6
The --disable-ipv6 flag is no longer working (1149303005), so the way to go is using the policy table (RFC3484) implementation of your OS:
- Windows: google
netsh prefixpolicies. - Linux: edit
/etc/gai.conf.
Unfortunately, Chrome's method for resolving names (async-dns) is ignoring the OS's IPv4/IPv6 precedence, so:
- Launching Chrome from the console with the flag
--disable-async-dnswill do the trick but, obviously, you'll loose that functionality. - Hopefully, Google will solve the issue 516305 some day :-)
if you're running linux with Google Chrome or Chromium, you can do the same thing as suggested by Matt.
Edit your /etc/hosts file as root.
I commented out all ipv6 addresses ( any with a colon : ) and I'm getting faster page loads, may be coincidence, but I don't think so.
1