Mental Jetsam

By Peter Finch

  •  

    July 2008
    M T W T F S S
    « Jun   Nov »
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
  • My del.icio.us links

  • Flickr Photos

    S5001187

    S5001169

    S5001136

    More Photos
  • Wordpress Stuff

Archive for July, 2008

Browser slow to connect to localhost on Vista

Posted by pcfinch on July 11, 2008

I’m developing a little HTTP server in C++ on vista (don’t ask why). Anyway, I found that my browser was REALLY slow when trying to connect to the localhost server “http://localhost:8282/” but not the local IP address “http://127.0.0.1:8282/”. When I say slow, I mean about 1 second per connection. A bit of hunting around and I found the following lines in the \windows\system32\drivers\etc\hosts file.

127.0.0.1       localhost
::1             localhost

I didn’t recognize the last line or know what it does… so I commented it out (I live life on the edge some time!!). Anyway, things sped up! e.g.

127.0.0.1       localhost
# ::1             localhost

You’ll have to edit the hosts file as the administrator as it’s protected, but this simple little fixed work for me. If your having a similar problem, I hope this helps you too.

Posted in C++/MFC, Vista | 4 Comments »