I am using an XMLHttpRequest to fetch an image from a server (run locally from a third party server-applet)
A simplified version of the code is show
You can use inline images
on server side encode your response in base64
in php use base64_encode("your data") and in javascript
base64_encode("your data")
result = document.getElementById('results'); result.innerHTML = '';