I am on test3.html and when i click the previous button on the top tool bar, it moves to test2.html.
I do not want to move to there. I want to move home which is test1.html
This will not work for every visitor, but you could set a cookie on test3.html and then check if the cookie exists on test2.html
Code:
if(cookieExists() && document.referrer.toLowerCase().indexOf("test1.html")==-1){
deleteCookie();
location.replace("test1.html");
}
function cookieExists(){
// check for your cookie here
}
function deleteCookie(){
// delete your cookie here.
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.