Link to home
Start Free TrialLog in
Avatar of ChrisTERiS
ChrisTERiS

asked on

Refresh page after clicking browse back button

In page "A" there is a link to page "B". How I can force refresh of page "A" when user clicks the back button being in page "B"?
Avatar of Kiran Paul VJ
Kiran Paul VJ
Flag of India image

Why do need to refresh page A? Is it due to cache problems.

Add no cache headers in page A so that browsers will not cache it.

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">

Clear browser cache manually before checking.
Avatar of ChrisTERiS
ChrisTERiS

ASKER

Thank you, but is not a cache problem. In page A there is an Ajax grid. Leaving the page I'm storing the grid's status in cookied and when user comes back, I'm restoring them. The code below works fine with IE but not with FF, Chrome etc. The only that I noticed is that if I refresh the page it loads the cookies. That's why I asked how I can refresh the page.
<script type="text/javascript"> 
	if ($.browser.msie == true) {         
		function warning() 
		{ 
			DG_Do(); 
		} 
		window.onload = warning; 		
	} else {   
jQuery(window).ready(function() {
DG_Do(); 
});	
	} 
</script>  	

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of ChrisTERiS
ChrisTERiS

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The other solution didn't worked. So I spent my time searching till to find a working solution.