Firefox and Chrome slow on localhost; known fix doesn't work on Windows 7

Herb Caudill picture Herb Caudill · Nov 13, 2009 · Viewed 33.7k times · Source

Firefox and Chrome are known to be slow on localhost when IP6 is enabled. In previous versions of Windows, the simplest fix is to comment out this line from the hosts file, as explained in the answer to this question.

::1 localhost

However, as noted in this question, in Windows 7 this line is already commented out:

# localhost name resolution is handled within DNS itself.
#   127.0.0.1 localhost
#   ::1 localhost

Is there an alternative way to disable the ::1 localhost reference in Windows 7?

Answer

Herb Caudill picture Herb Caudill · Nov 28, 2009

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.