Empty image src can destroy your site

I recently investigated a bug which caused a page load in IE7/8 to make two requests to the server, the second one without a querystring for some mandatory parameters – which caused some warnings in the server log.

Turns out that image tags with an empty src attribute cause this to happen in at least IE7 and 8. So if you have such a thing on a common page elements such as a header or footer, the load on your servers is doubled – not good.

There’s an in-depth discussion of this over at NCZ online – Empty image src can destroy your site, and also a solution using the base tag to prevent this from happening in IE.

The best solution of course is not to have such tags in the first place, but it’s good to have a defence given how easy it is to never notice the extra request.

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