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 the world.
Any idea? Do you know how top fix it?
ps: I'm using WAMP on a Windows VISTA machine
The 'taking too long to respond' error indicates that there is a communication problem between the target server and the client (your web browser). It means that the targeted server is taking a long time to send a response to the client. The error is usually sent if the client cannot get a response within 30 seconds.
Check your hosts file for unnecessary entries. /etc/hosts in Linux. C:\Windows\drivers in Windows. See if any other application is running on port 80. Verify that your web app is returning a response to the client.
Re: localhost keeps on loading, how to fix it? You should try using the Netstat button to see if both ports 80 & 443 are free. Its also possible that an OS error is preventing it from running. Check the Windows Event Viewer, Applications and System logs.
Based on my previous experience, one of the most common reasons of slowness is caused by your code trying to connect to MySQL server via 'localhost', which then resolved to the IPv6 address ::1. However, for XAMPP package, MySQL server is not listening to this address by default.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With