I have a web page and I would like to display a graph. I want to be able to specify the graph dynamically using DOT language. So I made a page that takes a DOT expression for the query parameter and returns image content. Now I can simply add an img tag with the appropriate `src.
<img src="/dot/png/graph{a--b}">
However, some servers have trouble with the long URLs. Is it possible to get an image via a POST request and display it in the img tag with JavaScript?
The only thing I can think of is having the server return a base64 encoded string of the image data, which you could include in an
imgtag like this:Be warned that the data URI scheme is not supported in IE7 and below, and that IE8 only allows 32KB of data in a URI.