Hi,
I have a small question regarding storing images in MySQL. I have a classic ASP based website and a MySQL backboned database. In the MySQL database I made a table TblImages to store some images. In order to show a image on the site I use the ASP file image.asp?ID=2 This is the code I used in the image.asp file:
ID=Request("ID")
adoCon.Open strCon
StrSQL = "SELECT * FROM TblImage where Image_ID =" & ID
AdoRec.Open strSQL, AdoCon
Response.ContentType = "image/gif"
Response.BinaryWrite AdoRec("Image")
I also used some code to prevent the ASP files are cached
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "No-Store"
Response.Buffer = True
When I use this the image is not stored in the temp. internet files. This is useful for me because nobody can steel copyrighted images.
What I would like to know is if I use this procedure, will there be a preformance loss in viewing the webpage or is there no diferance when I use <img src="ImageName.gif"> ? (I use the code to prefent caching on all the ASP pages)
Thanks in advance.
Alexander