[OpenLayers-Trac] [OpenLayers] #1049: Very long URL in imgDiv causes multiple requests for same URL
OpenLayers
trac at openlayers.org
Sun Dec 2 15:48:19 EST 2007
#1049: Very long URL in imgDiv causes multiple requests for same URL
-------------------------+--------------------------------------------------
Reporter: openlayers | Owner: euzuro
Type: bug | Status: new
Priority: major | Milestone: Future
Component: Tile.Image | Version: 2.5 RC1
Resolution: | Keywords: URL, Image, imgDiv
-------------------------+--------------------------------------------------
Changes (by crschmidt):
* milestone: 2.6 Release => Future
Old description:
> 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.
New description:
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.
Comment:
I can't find anything that would cause this explicitly, and I don't have a
plan to work on a fix. Bumping to future until someone indicates they're
working on it.
--
Ticket URL: <http://trac.openlayers.org/ticket/1049#comment:2>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list