I have a variables (Pic) which contains image data read with cffile. In order to write it directly back to the browser, I use the following code:
<cfheader name="Content-Type" value="image/jpeg"> <cfscript> context = getPageContext(); context.setFlushOutput(false); response = context.getResponse().getResponse(); out = response.getOutputStream(); response.setContentLength(arrayLen(Pic)); out.write(Pic); out.flush(); out.close(); </cfscript> This all works great, but I'd like to add an Expires header, in order to conserve requests and bandwidth. I am not able to get this to work, so has anyone ever created something similar and been able to succesfully implement Expires headers? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351927 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm