I have used the data:image URI to set the source of an image tag.
By default, the CSS display
property is none
.
When I get the image from the user, I change the source on this tag and it shows the image:
<img src="data:image/gif;base64:............" />
My questions are:
1. Even though the display is none
, I suspect the browser is still fetching the image. Am I right?
While fetching the browser should hit my server with relative URL. But sometimes it appends the source URI data to my absolute URL.... ONLY sometimes!!
/my-context/data:image/gif;base64....
2. Is this behavior expected? Is it browser specific? I am seeing the requests from Firefox 5.0 and below and Opera 10.0 and below causing this problem.