liamthebof Posted June 20, 2011 Share Posted June 20, 2011 Hello, Hopefully a simple question. <?php header("Cache-Control: private, must-revalidate, max-age=0"); header("Pragma: no-cache"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); echo date('l jS \of F Y h:i:s A'); ?> ^^Does not work, except IE7 When I click on a link off of the above page, then hit the back button on the browser, I need the page to reload so that the new 'date' will be echoed. Must be multi browser compatible. Any solution appreciated, JS possibly? Thanks Quote Link to comment Share on other sites More sharing options...
liamthebof Posted June 20, 2011 Author Share Posted June 20, 2011 Where is edit post? Anyway, updated code: <?php header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); echo time(); ?> <a href="http://google.com">aaaaaaaaaaaaa</a> This works now for Firefox 4, IE8, Chrome 12. Does not work for Opera 11 however, any ideas? Quote Link to comment Share on other sites More sharing options...
Psycho Posted June 20, 2011 Share Posted June 20, 2011 1: The edit button is only available for a short while after posting 2: Since adding some HTML worked for some browsers. Try creating a complete, valid HTML page. Quote Link to comment Share on other sites More sharing options...
liamthebof Posted June 20, 2011 Author Share Posted June 20, 2011 Converted page to this: <?php header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"> <!--the rest of my page--> <body> <?php echo time(); ?> <a href="http://google.com">aaaaaaaaaaaaa</a> </body> </html> Still not working in Opera. Any suggestions? Quote Link to comment Share on other sites More sharing options...
Psycho Posted June 20, 2011 Share Posted June 20, 2011 Still not working in Opera. Any suggestions? Don't use Opera. Sorry, couldn't resist. Quote Link to comment Share on other sites More sharing options...
liamthebof Posted June 20, 2011 Author Share Posted June 20, 2011 Right, found out its a built in feature of opera to always cache pages. The only exception to this rule is if https is used. May aswell consider this solved, poor play on opera's front. Quote Link to comment 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.