jpg files cashe problem.

  harristweed 09:36 21 Jul 06

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.

Nintendo Switch review: Hands on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

Here's what should be coming to Adobe Project Felix in 2017

Apple AirPods review: Apple's beautiful new Bluetooth headphones bring true intelligence to…