0

From the point of view of uploading, we can use MIME multipart to carry multiple files within a single request. I'm wondering if it is possible for a web server returning set of images (binaries) through a single JSON message to the browser at the client side? If so, is it able to be demuxed and rendered by the browser as retrieving multiple images by using tags?

Please advise.

Thanks & regards, William

William X
  • 6,751
  • 6
  • 31
  • 50
  • 1
    JavaScript sucks at binaries - might be the wrong approach. See http://stackoverflow.com/questions/327685/is-there-a-way-to-read-binary-data-into-javascript – Thomas Dec 13 '10 at 03:27

1 Answers1

2

You can use base64 to encode the image and included in json. Then use data scheme URI to retrive the image.

More about data scheme URI. http://en.wikipedia.org/wiki/Data_URI_scheme

WaiLam
  • 997
  • 1
  • 9
  • 15