[OpenLayers-Dev] XmlHttpRequest streams ?
Paul Spencer
pspencer at dmsolutions.ca
Thu Nov 15 13:00:12 EST 2007
Guillaume,
You are correct, of course. The only thing that got me wondering
about this approach was the fact that there are a couple of
outstanding issues that are all dealing with browser differences in
image handling. The two that come to mind are:
1) Safari doesn't generate an onload event if you change the src of an
image to the same thing, which has lead to several bugs. The
currently proposed fix is to set the src to some sort of blank image
and then reset it.
2) IE 7 has been reported recently having problems with reload
attempts on tiles that don't load properly.
I'm not sure if this ajax technique would have any advantages, I was
thinking that it might flatten the playing field in terms of how each
of the browsers deals with some of these things and perhaps make error
handling a bit more robust.
I am not sure about caching in this case though. Theoretically, these
types of requests should get cached in the same way. In practice, not
sure.
Cheers
Paul
On 15-Nov-07, at 12:32 PM, Guillaume Sueur wrote:
> Thanks for this link Paul.
> But I must admit I don't really see the point here. Images in HTML can
> already be changed on the fly. What is the difference between Google's
> example :
> image.src =
> ajaxPicture("http://www.google.com/intl/en_ALL/images/logo.gif" );
> (AjaxPicture being the XMLHttp function to get the 'responseStream'
> stuff)
>
> AND
>
> image.src = "http://www.google.com/intl/en_ALL/images/logo.gif" ?
>
> Did I miss something ? Does it allow to handle easier already in cache
> images URLS ?
>
> Cheers,
>
> Guillaume
>
> Paul Spencer a écrit :
>> Here is a quite well written article about the XmlHttpRequest object,
>> nothing stunningly new ...
>>
>> http://code.google.com/support/bin/answer.py?answer=79663&topic=11366
>>
>> except this was news to me:
>>
>> http://code.google.com/support/bin/answer.py?answer=79663&topic=11366#scenario1
>>
>> Apparently you can access responseStream member and assign it to an
>> image src to do 'ajax' loading of images. I'm wondering if this
>> might
>> provide more reliable error handling for tile loading.
>>
>> Paul
>>
>> +-----------------------------------------------------------------+
>> |Paul Spencer pspencer at dmsolutions.ca |
>> +-----------------------------------------------------------------+
>> |Chief Technology Officer |
>> |DM Solutions Group Inc http://www.dmsolutions.ca/ |
>> +-----------------------------------------------------------------+
>>
>>
>>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
>>
>
> --
> Guillaume SUEUR
> Expert SIG et OpenSource
> NEOGEO
> 46 RUE MATABIAU
> 31000 TOULOUSE
> 06 65 58 88 82
> Site web : http://www.neogeo-online.net
>
> <guillaume_sueur.vcf>_______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Chief Technology Officer |
|DM Solutions Group Inc http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+
More information about the Dev
mailing list