force page to reload from server instead of load the cached version using -'php,javascript,jquery'

force page to reload from server instead of load the cached version  using -'php,javascript,jquery'

I have webpage A. The user clicks on a form to submit data, and it takes him to webpage B. When he clicks the back button, I need webpage A to be refreshed from the server, rather that loaded from cache. I have this: <meta http-equiv="expires" content="0"> but it doesnt seem to work. I have also tried setting a variable on page B (session variable via php) and then check for it on page A and refresh (or not) according to its existence. This doest seem to work either. The basic code for that is:
Page A:

if(isset($_SESSION['reloadPage'])) {

And on page B:

$_SESSION['reloadPage'] = 1;

With the PHP solution, it simply keeps trying to refresh the page in a never ending loop. Something in my logic missing? Is this the right way to go about it?

Upon further investigation, when you tell the browser to not cache the page, does that force a full server side refresh as well? That's what I need. A full server side refresh of the page.

asked Sep 7, 2015 by rajesh
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.