Preventing my browser from going back to previous page

129 views
asked Aug 11, 2012 in General by Maria (1,020 points)
Hello
How to make sure that a specific page refreshes completely when using the back button? It looks like the page is cached and every time anyone uses the back button the page loaded is the cached version and therefore the variables are not reset, how can I prevent this? Please help
Thanks

2 Answers

0 like 0 dislike
answered Aug 11, 2012 by expert (14,380 points)
A good way of cashing would be to put this code into your theme's header.php, right on top of everything else.
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 2000 05:00:00 GMT"); // A past date
?>
0 like 0 dislike
answered Aug 11, 2012 by WebProX (12,200 points)
To reload the page at a set of tervals add this code to the head
<META HTTP-EQUIV="refresh" CONTENT="XX">
...