Site Meter

Speeding up communication between Firefox and Visual Studio’s built-in web server

image Has anyone else noticed that, during development, if you use Firefox to browse a site hosted in Visual Studio 2005/2008’s built-in web server (WebDev.WebServer.Exe), it’s really, just, so, excruciatingly … slow?

Oh it’s fine if you use Internet Explorer. Or Chrome for that matter. But every request issued from Firefox to WebDev.WebServer.Exe seems to have about a full second of lag added. If your pages host multiple images and CSS files, it’s intolerable.

It works on your machine

What’s that you say – you haven’t experienced this problem? Lucky you! I’ve asked other developers about this, and they all claim it’s fine on their machine too. And a quick Google search doesn’t turn up any other reports of the issue.

But I’ve had four different physical development PCs in the last couple of years, running three major different OS versions, two major different versions of Visual Studio and two major different versions of Firefox, and still have been wading through treacle every single time! Firefox is way faster communicating with servers on the other side of the planet than with this particular web server hosted on the same PC. What gives?

The conspiracy theorist in me even wondered if some evil person in Microsoft had hard-coded this behaviour into VS, intending to discourage web developers from working exclusively in Firefox. I confess I even changed my Firefox UserAgent string to match MSIE, but that didn’t help.

The solution

Finally! It turns out to be something to do with IPv6. I don’t know whether the problem is in Firefox or in WebDev.WebServer.Exe, but disabling Firefox’s IPv6 support is like cutting off the ball and chain. Suddenly, communication with the local server is back to the blistering pace you’d expect.

All you need now is instructions for disabling Firefox’s IPv6 support.

18 Responses to Speeding up communication between Firefox and Visual Studio’s built-in web server

  1. Thank you so much for posting that info! I have experienced that problem for so long, and this seems to solve it.

    I also thought that Microsoft had made WebDev.WebServer so slow on purpose, but now i (almost) feel bad for thinking that :-)

  2. Matt

    What is the best place to go for problems like this? I am running Visual Studio 2008 Web Express Edition and there are times that it’s so slow that I have to wait minutes for it to become responsive again. It’s so frustrating I’ve started to turn to Notepad++ for some of my basic tasks, allowing me to work in a limited fashion while I wait for VS to catch up. My machine is decent: 2 GB ram, 2.8 Ghz, 7200RPM drive running XP Pro.

  3. Genius! I always wondered what caused this.

  4. Steve

    @Matt – no idea, sorry! VS shouldn’t be unreasonably slow on a machine that powerful. Rather than trying to track down the problem, you could just cut your losses, format the hard disk, and reinstall the OS and everything.

  5. We had also experience this at work. You would only encounter the problem if you are on Vista.

    The solution is simple though.. all have to do is navigate to “about:config”, locate the IPV6 and disable it.

    Thanks for the post.

  6. @Lamin – I’ve definitely had this problem on XP as well as Vista and Server 2008.

  7. Dana

    Holy crap, I’ve been fighting with this for months and just thought it was me. Thanks!!!

  8. Awesome! Thanks for posting this.

  9. Thanks! Mystery solved!

  10. Rochedo

    No meu caso tive que ativar o IPV6 !!
    Quando ele fica desativado, a comunicacao fica lenta.

  11. Rochedo

    Sorry, in inglish …..
    In my case I had to activate the IPV6 !!
    When it is disable the comunication is very slow.

  12. Jon

    Ohhhhh at LAST! Steve, next time I’m in Bristol I’ll keep an eye out for you so I can buy you a pint. Thank you for making me swear less on a daily basis.

  13. Owen Wattley

    go to C:\WINDOWS\system32\drivers\etc and edit the “hosts” file with Notepad.

    Comment out (remove the #) the two entries for
    # localhost
    #::1 localhost

    and change ::1 to :::1 (add an extra :)

    This will fix the problem for all browsers – Chrome, Safari, Opera, you name it. Best of all, you don’t need to fiddle with any browser settings!

    I hope people find this useful. It has certainly stopped me from gonig mad.

  14. Steve

    Thanks Owen, that’s a brilliant tip! Coincidentally I was trying to get Chrome to disable IPv6 yesterday and couldn’t find any way to do it, but your method solves the problem.

  15. bojongus

    from 1.07 s to 50 ms

  16. Bojangus

    Thanks Owen, and Steve!