localhost is slow sometimes
I'm using firefox as my default browser for my basic webdev learning process and I wish to know why when I'm doing some file transfer as ftp or p2p, accessing localhost takes so much time, as I was accessing an http server from the other side of 开发者_JAVA技巧the world.
Any idea? Do you know how top fix it?
ps: I'm using WAMP on a Windows VISTA machine
type about:config in firefox address box .. continue to the settings
in the search that comes up put "network.dns.disableIPv6" .. and make sure it is set to "true"
this should solve your issue.
To completely bypass localhost without altering any about:config properties you can install the addon Redirector and make a rule to redirect from localhost to 127.0.0.1. Use these settings
Include pattern : http://localhost*
Redirect to : http://127.0.0.1$1
Leave the other fields empty.
http://crazyviraj.blogspot.com/2009/09/fix-for-slow-firefoxchrome-connects-to.html
Have a look at this article , it was a problem for me and after making the change made a huge improvement.Though i should note this mostly happened with the ASPNET server , not sure what you are using
A better and simpler way to solve this in Windows without having to make changes to your browser or use any third party software is to edit your hosts file.
Full instructions:
- Run notepad as administrator (right click and select "Run as Administrator")
- go to File -> Open...
- In the Open dialog, make sure you have selected "All files" and not "text documents (*txt)"
- navigate to your hosts file. Usually found at C:/Windows/System32/drivers/etc/hosts
- Add the following on a new line at the bottom: 127.0.0.1 localhost
- Save hosts file.
Depending on your browser, you might need to restart. For me it fixed the issue instantly (Chrome v33)
精彩评论