qx.io.ImageLoader not working on mobile Safari

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

qx.io.ImageLoader not working on mobile Safari

Werner Thie
Hi all

just had a few drab moments realizing that the qx.io.ImageLoader.load()
code cannot predictably load images in mobile Safari.

Is this confirmed behavior and how to circumvent that problem?

TIA Werner

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.io.ImageLoader not working on mobile Safari

Daniel Wagner
Administrator
Hi Werner,

we're not aware of any problems. Can you give us some more information
on what you're doing and what's going wrong?

Regards,
Daniel

On 02/06/2013 05:44 PM, Werner Thie wrote:

> Hi all
>
> just had a few drab moments realizing that the qx.io.ImageLoader.load()
> code cannot predictably load images in mobile Safari.
>
> Is this confirmed behavior and how to circumvent that problem?
>
> TIA Werner
>
> ------------------------------------------------------------------------------
> Free Next-Gen Firewall Hardware Offer
> Buy your Sophos next-gen firewall before the end March 2013
> and get the hardware for free! Learn more.
> http://p.sf.net/sfu/sophos-d2d-feb
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: qx.io.ImageLoader not working on mobile Safari

Werner Thie
On 2/7/13 4:34 PM, Daniel Wagner wrote:

> we're not aware of any problems. Can you give us some more information
> on what you're doing and what's going wrong?

Basically creating a Image midflight programmatically

var img = qx.io.ImageLoader.load(uri);  //only a tiny one, like 32x32px
      :
      :                                  //some time later
qx.io.ImageLoader.isLoaded(uri);        //check repeatedly, fail


- the image is not requested every time the page is refreshed
- the request situation is muddied, when Safari is put to sleep by iOS
- if Safari is removed from running apps (double push home, clear), the
request situation is muddied even more, I couldn't detect a
deterministic pattern when the img was actually requested over the wire

Now, I went to bare metal JScript fooling around with Image Objects,
Image.complete, naturalWidth/Height and the like and after some hours
tracing output from Safari (thanks to logging code of qooxdoo :-) I see,
that if the image is actually requested over the wire

- I have an img instance which provides a complete flag correctly
working (although complete is not in the standard)

If the image is not requested over the wire,

- I have no img object, (img is undefined) therefore no complete flag,
the checking code fails running into a timeout.

The situation can be satisfactorily corrected by having the images in
question in the basic html code in body as img, everything
programmatically done afterwards becomes deterministic.

Why did I stumble?

I wanted to load images some time after the page was loaded under
certain conditions and also wanted to make sure that the image in
question was loaded completely. Running the code on every other browser
in the universe works like a charm, but take Safari mobile and it
becomes erratic, sometimes I got image loading timeouts, then the app
was loading no problem, no deterministic pattern observable.

This behavior is proven to exist from iOS 4 up, phone and pad, other
browsers on iOS do not show that odd behavior of Apples Webkit.

Sorry for rambling so long, Werner






------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel