jpg files cashe problem.

  harristweed 09:36 21 Jul 2006

I have a folder containing a few photos (jpg). The jpg files are named:
They are displayed in this order.

I have a script that renames the jpg files so that they will display in a different order. I.e. If star10x1.jpg is a picture of a cat and star10x2.jpg is a dog the cat will be on top! If I now rename star10x1.jpg to star10x2.jpg and star10x2.jpg tostar10x1.jpg the dog picture will now be on top, right?

Wrong. Because the pictures are cashed by the browser, as far as the browser is concerned star10x1.jpg is still the cat.

I have this at the top of the page:
$now = gmdate('D, d M Y H:i:s') . ' GMT';
header('Expires: ' . $now);
header('Last-Modified: ' . $now);
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header('Pragma: no-cache'); // HTTP/1.0
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

And still the pictures are cashed!

Any help would be appreciated.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

WPA2 hack: How secure is your Wi-Fi?

Add Depth Of Field to a photo using Tilt Shift Blur in Photoshop

iPhone tips & tricks

Les meilleures tablettes 2017