This morning I solved one of those mysterious problems that cause insomnia, premature baldness and/or random acts of violence such as throwing anything out of the window with an on/off switch.
One of the web forms I’m working on stores an object in the Session scope. The object is being created on the initial (non-postback) call of the webpage and fetched from the Session on subsequent postbacks. One particular part of the page utilizing AJAX caused the object to be reset to its initial state and that was when the detective work started.
Firebug showed that after loading a dynamic part of the page an additional HTTP GET was done. It turned out to be an IMG tag with an empty src attribute, i.e.
<img src="" />
that was filled in after dynamically inserting the HTML, causing the aforementioned HTTP GET by the browser. The solution was to point the IMG to a valid (empty) image first and overwrite that later.
This reminded me of a similar case I had a long, long time ago in a place near, nearby where a piece of faulty HTML also caused an additional GET. Exercise for the reader:
(Yes folks, that was in the day that CSS did not exist yet and “Auto-complete” referred to a letter stating that your T-Ford was ready.)