I'd like to hide my image, so I load images using ASP script. But I see the images are not cached, is there a way to cache this kind of images?
My code:
Response.Buffer = True
response.Expires=240
response.CacheControl="Public"
Response.ContentType = "image/jpeg"
Set http = Server.CreateObject("MSXML2.ServerXMLHTTP")
http.open "GET","http://www.test.net/images/" & request.querystring("ID"), False
http.Send
Response.BinaryWrite http.ResponseBody
Set http = Nothing
Response.Flush
Response.End
This file is named test.asp and I call it via test.asp?ID=12345, like that:
<img src="test.asp?ID=12345">
The firebug shows OK for the image to be loaded not 302 not modified.
Is it possible to cache such kind of images?