MadTechie Posted April 1, 2007 Share Posted April 1, 2007 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 ? Quote Link to comment https://forums.phpfreaks.com/topic/45095-no-cache-please/ Share on other sites More sharing options...
micky1955 Posted April 1, 2007 Share Posted April 1, 2007 this works for me - got it from another member a while back Header("Cache-control: private, no-cache"); Header("Expires: Mon, 26 Jun 1997 05:00:00 GMT"); Header("Pragma: no-cache"); Quote Link to comment https://forums.phpfreaks.com/topic/45095-no-cache-please/#findComment-218914 Share on other sites More sharing options...
MadTechie Posted April 1, 2007 Author Share Posted April 1, 2007 Thanx for the suggection but no affect.. as i said its weird.. Quote Link to comment https://forums.phpfreaks.com/topic/45095-no-cache-please/#findComment-218918 Share on other sites More sharing options...
AndyB Posted April 1, 2007 Share Posted April 1, 2007 You could try to force the image to be loaded again by faking a different name for it - add a random number to it, i.e. bob.jpg?random#here. The browser will think it's different and load it again from the server. Quote Link to comment https://forums.phpfreaks.com/topic/45095-no-cache-please/#findComment-218929 Share on other sites More sharing options...
MadTechie Posted April 1, 2007 Author Share Posted April 1, 2007 weird thing is that also failed, i'll review my code.. and see if i can make a simple example to post. Quote Link to comment https://forums.phpfreaks.com/topic/45095-no-cache-please/#findComment-218974 Share on other sites More sharing options...
kenrbnsn Posted April 1, 2007 Share Posted April 1, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/45095-no-cache-please/#findComment-218979 Share on other sites More sharing options...
interpim Posted April 1, 2007 Share Posted April 1, 2007 I've noticed problems with Firefox sometimes when trying to reload pages... where changes I've made don't show up until I clear the cache... even changing the name of files etc... Not sure how it happens. Quote Link to comment https://forums.phpfreaks.com/topic/45095-no-cache-please/#findComment-218989 Share on other sites More sharing options...
MadTechie Posted April 1, 2007 Author Share Posted April 1, 2007 Oh yes kenrbnsn, checked for that (done it too many times) Humm i am using firefox i'll play with IE see what happens Quote Link to comment https://forums.phpfreaks.com/topic/45095-no-cache-please/#findComment-219018 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.