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 someone else noted in a different answer - if you have bitdefender, then that will merrily ruin your development experience.
Best to open the bit defender console, enter alt-shift-control-g (which puts it in "game mode") and run from there.
in game mode, bitdefender won't bollocks up your localhost!
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 localhost
255.255.255.255 broadcasthost
::1 something.local
::1 something2.local
::1 something3.local
::1 localhost
fe80::1%lo0 localhost
This isn't a direct answer but I had the same problem and none of the above IPv6 or hosts file changes worked for me. My asp.net MVC4 project was really slow after hitting F5 to refresh js changes on localhost. It was happening across all browsers - Chrome, FF, and IE. Eventually I found out that IIS Express 8.0 got installed without me realising, and it turns out 8.0 is extremely slow when serving up js files and seems to be a bug. If I ran iisexpress on the command line and hit F5 I could see each js file took 4 or 5 seconds to load.
I ended up uninstalling IIS 8.0 and installing IIS express 7.5 and straight away the problem was fixed. Here are the steps I followed:
IIS Express 8.0 seems to be installed with VS 2012 so if you had a new install or possibly a service pack update this might have upgraded your previous IIS express version.