Firefox and Chrome slow on localhost; known fix doesn't work on Windows 7
Turns out if you uncomment the 127.0.0.1 line in the hosts file, Chrome goes back to its snappy self on localhost URLs.
# localhost name resolution is handled within DNS itself. 127.0.0.1 localhost
The hosts file is typically at C:\WINDOWS\system32\drivers\etc\hosts
. To edit it in Win7, you'll need to run Notepad as administrator.
It turns out that the slowness is caused by an IPv6 issue with DNS and can easily be resolved by turning IPv6 support off in Firefox while doing localhost testing. To make the change, type
about:config
in the address bar, locate the
network.dns.disableIPv6
setting and double-click on it to set it to true. This does the trick for the Firefox localhost issue on Vista and everything is running fast again.
http://kb.mozillazine.org/Network.dns.disableIPv6 has all the info you probably need - good luck!
I ran into a strange issue with only one of my local domains being slow while all the others responded just fine. Couldn't figure out why and finally put ::1 localhost
at the bottom underneath my other ::1 something.local
and it instantly cleared up, where previously I had it above the other entries. (I'm running OS X 10.8.3)
My final hosts file wound up looking something like this:
127.0.0.1 localhost255.255.255.255 broadcasthost::1 something.local::1 something2.local::1 something3.local::1 localhostfe80::1%lo0 localhost