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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s