If an URL is very long for the src image (I am using an URL which is 4407) it's possibile that you will get 2-3 requests for the same image. This is a timing issue.
I am running with a single tiled WMS layer.
I've verified the problem with firefox 2.0.0.7.
In 2.5 RC1 lines 122-124, the image div is updated.
122 this.imgDiv.src = this.url;
123 OpenLayers.Util.modifyDOMElement(this.imgDiv,
124 null, null, imageSize) ;
in line 122 the first call to the web server to get the image is sent out from the browser.
The in utils.js, lines 154-146 of modifyDOMElement, it looks as if the first request for the image src hasn't been acknowledged? line 155 will cause an identical request from the browser, and line 156 another.
154 if (sz) {
155 element.style.width = sz.w + "px";
156 element.style.height = sz.h + "px";
157
It's easy to see it's a timing problem when debugging with Firebug. Putting a breakpoint before setting the src and on the return from the modifyDOMElement, three requests go out. Instead if I step into modifyDOMElement, i.e. giving the
"this.imgDiv.src = this.url;" the extra second or two to get going, lines 155-156 don't set off the extra request.
I don't have any immediate fix but the problem is certainly an efficiency problem and in our case where we "pay" for every map request, it is also 3 times as costly.