Skip to content

Instantly share code, notes, and snippets.

@tkadlec
Created August 10, 2012 18:53
Show Gist options
  • Save tkadlec/3316747 to your computer and use it in GitHub Desktop.
Save tkadlec/3316747 to your computer and use it in GitHub Desktop.
Determine if image has been downloaded
var myImage = new Image();
myImage.src = "http://somedomain.com/image2.png";
if (myImage.complete) {
//already downloaded
} else {
//not yet downloaded
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment