I have an image that the user drew on a canvas and i want to save that image on the server.
These lines work well on my ipad but not on my android(ver 2.3.3) browser
An alternative implementation that we have used successfully on multiple Android handsets without modification is described in this blog post:
http://jimdoescode.blogspot.co.uk/2011/11/trials-and-tribulations-with-html5.html
This uses the toDataURL method if it works correctly, and if not uses a javascript jpg encoding library to produce the image.