RE: [PHP] images doesn't seem to cache

2004-11-09 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 06 November 2004 20:09, anders thoresson wrote: > > This code seems to work. Have I got it right? > > No. I have not. Sometimes the images are viewed from the > cache, just >

Re: [PHP] images doesn't seem to cache

2004-11-08 Thread Marek Kilimajer
anders thoresson wrote: This code seems to work. Have I got it right? No. I have not. Sometimes the images are viewed from the cache, just to get downloaded from the server again next time, just a minute later, when I try again. My local development server is running IIS, my production serve

Re: [PHP] images doesn't seem to cache

2004-11-07 Thread anders thoresson
it won't be a php-parameter. Seen as the script isn't executed when the server decides it is the same as the cached version. So only if it deems not to be, then it runs the script, and when it does that, the script doesn't need to know anything about modified-since, because that checks has long

Re: [PHP] images doesn't seem to cache

2004-11-06 Thread M. Sokolewicz
Anders Thoresson wrote: This code seems to work. Have I got it right? No. I have not. Sometimes the images are viewed from the cache, just to get downloaded from the server again next time, just a minute later, when I try again. My local development server is running IIS, my production serve

Re: [PHP] images doesn't seem to cache

2004-11-06 Thread anders thoresson
This code seems to work. Have I got it right? No. I have not. Sometimes the images are viewed from the cache, just to get downloaded from the server again next time, just a minute later, when I try again. My local development server is running IIS, my production server is running Apache. Whe

Re: [PHP] images doesn't seem to cache

2004-11-06 Thread anders thoresson
Your eyes are fine. You need to check for If-Modified-Since header, if the time is older than file modification time (filemtime()) send Last-Modified header and the image, else send 304 Not Modified response. This code seems to work. Have I got it right? // Get the time the cache file was last m

Re: [PHP] images doesn't seem to cache

2004-11-05 Thread Marek Kilimajer
anders thoresson wrote: Hi, I put all my images outside the web root, the prevent direct access, and then access them with a -tag like this: where fnc_get_image.php is: // Check if user is logged in require_once 'global_includes.php'; $user =& new User(); // Get path to image for display $path =