0
Set global variable in javascript . When the page is loaded first time set the global variable not to go previous . Once it goes to next page reset back the global variable value again . Based on the global variable value you need to enable or disable the link.