Sep 05 2007
Empty src attribute on <img> is the devil!
.. at least when combined with Firefox.
To make a short story long, here’s the full story :p
The last few days at work has been a battle of the rare and unpredictable.
A weird bug in our latest project made my team go crazy (you know, the BAD kind of crazy),
and it was a Firefox only bug. oO
It started off when our “report this” feature returned double reports, one with the POST based (non-required) input, and then another one with only the GET variables (id, required value).
This got us all fuzzed and put our brains to the test. Loading our favourite Web debugger tool (firebug anyone?), we saw that Firefox added another GET request for each and every page on our site. That was odd, very odd.
Searching for an answear, we started checking all the pages, each and every one, and it appeared that the double requests happened on all pages, but only when the user was logged in.
So naturaly, we started looking at the login process. Session management anyone?
And if you read the title right, the session road was a dead end road.. a long and tidious dead end road that is..
And after a few hours with firebug, http header monitor, calling the hosting company, and all that fuzz… I updated our user-navigation menu, adding an icon where the src attribute was empty, and guess what.. Suddenly, NO MORE DOUBLE GET REQUESTS!
So that was it, an empty src=”" made calls back to the same page (much like a missing action attribute for forms or empty action=”" loads the same page on submit).
[ratings]
