User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Generated images & browser cache Page [1]  
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

 Message Boards » Tech Talk » Generated images & browser cache Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.