Jump to content

no-cache, please!


MadTechie

Recommended Posts

Ok, a little weird this one.

i have a page that seams to get stuck in the cache,

 

Now i thought adding

header("Cache-Control: no-cache")

would of worked...

 

basically it shows the first bob.jpg, then i change a few things and it stays the same, i then load the file from its true path and the changes where their but not on the one below!

 

<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
//Creates bob.jpg
//kinda long so didn't post
//done creating
$filename = "bob.jpg";
echo "<EMBED src='$filename' width='100%' height='100%' href='$filename'></EMBED>";
?>

 

i hope that makes sence

 

any ideas ?

Link to comment
https://forums.phpfreaks.com/topic/45095-no-cache-please/
Share on other sites

Are you sure you're trying to load the correct version of the script. I've had instances where I'm debugging a script and whenever I run it, my changes don't appear -- it always turns out to be that I've upload the test script to the wrong area or it's uploaded to the right area, but my browser is pointed to the wrong area.

 

Ken

Link to comment
https://forums.phpfreaks.com/topic/45095-no-cache-please/#findComment-218979
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.