// Get the image into the cache as we are not testing the network speedvar req =new XMLHttpRequest() req.overrideMimeType('text/plain; charset=x-user-defined') req.open('GET','http://jonathanleighton.com/images/me.jpg',false) req.send(null)