问题
I have some pages on my local machine, accessed via localhost, that are horribly slow to open/load using IE8, but very fast using Firefox, Opera, Chrome and Safari.
They used to load really quickly using IE7.
I produced a cut down page to test - to see what was causing the problem - and seriously, the most simple page possible causes it! I.e:
<html>
<head></head>
<body>
Hello!
</body>
</html>
Takes about 15 seconds to open on localhost in IE8, and is instant on all other browsers! Why? What can I do to resolve this?
By the way, tried this on a Web server, connecting via a URL via IE8, and it was basically instant when opened via IE8 via the Web/Web server!
I have Windows Update enabled, so should have the latest of everything.
Note: I only noticed this after my internet connection changed, which was about 2 weeks after IE8 was installed. Possibly that is coincidence, it MAY have started with the install of IE8, I am actually not sure. It is definitely happening now though.
The URL I am using is: http://localhost/fb/starttest.htm
Help!
回答1:
Try the following:
1- Navigate to C:\Windows\System32\drivers\etc
2- Open the file hosts
using any text editor
3- Add this line to the end of the file
127.0.0.1 localhost
4- Before you save this file, you need to make sure that any program that access the internet (browsers etc.) is closed - Save the file and test it
回答2:
Under Tools -> Internet Options -> Connections -> LAN Settings, is the box "Automatically detect proxy servers" checked?
If so, that does a DNS request to wpad.(domain search suffix) to discover proxy servers via their Auto Discovery Protocol.
If nothing responds, the query will have to timeout before it gives up.
回答3:
I also had this exact same problem recently - 'localhost' taking 15 seconds to load, but 127.0.0.1 loading instantly.
However, I have now fully solved my problem, so I write here in the hope that it will help someone.
My problem coincided with the purchase of a D-Link DIR-655 wireless router, so after trying many of the kindly offered 'fixes' on this forum, I turned back to my router settings in search of an answer.
I eventually discovered a setting on the SETUP - NETWORK SETTINGS page. The 'Enable DNS Relay' box was checked, so I read about it, and it apparently allows the router to lookup DNS addresses from the ISP's server. This is obviously not desired for a 'local' address on my own PC, and so I tried unticking it.... and HEY PRESTO, IT WORKED!!!
I hope this work for some of you, too!
All the best,
Rob
回答4:
I have exactly the same problem as you do, except I'm using IE7 (IE takes about 16 seconds to load localhost, while Firefox and Google Chrome loads it in an instant).
I don't have the autodiscovery for proxy checked either. I also tried starting IE without add-ons (From Accessories->System Tools) and it didn't make a difference.
I found out that using 127.0.0.1 instead of localhost greatly improved the speed (like 2 seconds instead of 16 seconds!). However, I edited hosts file and I left only the line
127.0.0.1 localhost
and this didn't fix the problem. Need to dig some further.
Regards, Nicolae
来源:https://stackoverflow.com/questions/1934587/ie8-on-localhost-really-slow-firefox-opera-chrome-and-safari-all-fast-on-the