mattc All American 1172 Posts user info edit post |
Any way to get browsers to cache images generated by scripts (php, asp.net, etc?) I've been messing around with this in asp.net but I haven't had any images cache properly yet.
Guid is already set to a unique guid
string LastModified = File.GetLastWriteTime( FilePath ).ToString( "r" ); Response.ClearHeaders(); Response.ContentType = "image/jpeg"; Response.Cache.SetExpires(DateTime.Now.AddDays(1)); Response.AppendHeader( "Etag", Guid ); Response.AppendHeader( "Last-Modified", LastModified ); Response.TransmitFile( FilePath ); Response.End();
[Edited on February 28, 2006 at 12:19 AM. Reason : .] 2/28/2006 12:18:22 AM |