[Resolved] addImageAsync fail on IOS safari loading image over certain size

[Resolved] addImageAsync fail on IOS safari loading image over certain size
0.0 0


Thank Mr Wu for finding out the limitation on Mobile Safari (actually i think it apply to most of the mobile browser since it does not work on Chrome as well)
The image of my sprite has reach the limitation of the browser.
So my dream of a fully animated character (1000 frames) has hit the wall.

My solution will be then

  • stop using spritebatchnode (because it can only contain 1 image)
  • do a proper JSB version of the game on mobile platform (if there is no limit on the image size)

—Original Post

I am using cc.TextureCache.getInstance().addImageAsync to load all my images of the scene.
recently 1 of the png file (out of 6) grow from 800kb to 1.1mb
and on IOS safari the image never call the callback function to indicate the loading has finished.

is there some way to add a FAIL callback to addImageAsync or some way to tell why it’s failing.

it still works perfectly under desktop browser Safari and Chrome.

Iphone4 + Cocos2d-html5-v2.1.1



what is the resolution of the png file?

what server are you using to serve the files?


Server is Mac XAMPP 1.7.3-beta1

Image is 3000*2530 pixel (before update was 1000*2530 and this works)

I guess the critical information is that everything works perfectly on desktop browser but the last image fail to load on my iPhone Safari (and Chrome)


please refer to here



ahh, Thanks for finding out.

I should really find this myself rather than questioning that’s a bug of Cocos