Browsing to localhost is slow when connected to Internet

What's probably going on when you are connected to Internet is that your system tries to resolve name localhost in yours ISP DNS servers.

As a solution you can define name localhost as IP address 127.0.0.1 in your hosts file which is read before querying DNS servers. Since you have Windows 7 you should have required entry in C:\Windows\System32\drivers\etc\hosts file but by default it's commented out. Start Notepad as Administrator by right-clicking on it and choosing Run as Administrator. Open your hosts file and change lines:

#   127.0.0.1       localhost
#   ::1             localhost

to:

127.0.0.1       localhost
::1             localhost

Basically uncomment it by removing # from the beginning of these two lines. Save the file and test if it resolved your problem.


Al right, it seems no problem of the system itself, windows or network but remove some hidden networkcard configurations from the past and disable all WAN-miniports in the hardware configuration that increases the speed a little.

But that was not the problem causing the long delays when connected to the internet. In the php code there was some cURL code that connects to a slow site to get some additional useragent info (REST interface). Because the data was not cached and the site access slow down in time for some reason, it connects to this slow site for each part of the webpage. This caused the long delays.

Now it is cached, the problem no longer exists. Thanks for the input anyway.