Is your browser requesting a page twice?

For the initial release of Naymz, Michele Lopatin and I have been tracking down a bug that was causing the browser to fetch the same URL twice. In order to track this down I had to systematically comment out lines of HTML in the page until it stopped and then uncomment lines until it came back to figure out exact what was requesting the page the second time. This was a huge issue because it essentially doubled the load on the server and the bandwidth usage.

As it turns out in FireFox (and possibly IE, but I’m not sure as I run Linux completely now), empty image src attributes cause the browser to request the same URL of the current page the browser is pointing to. This is really DUMB on the FireFox developers (or the W3C if it is in the specification) part since this should just error out:

<img src=””/>

Instead they decided to try requesting the URL of the current page again in hopes that it would magically return an image, which of course it is never really gonna do because the current URL is what your are rendering. Lame. At least we figured it out before launching and getting pounded with double requests.

55 thoughts on “Is your browser requesting a page twice?

Leave a comment