I have created a html page with the following code in between “head” tags:
meta http-equiv="Refresh" content="5; url= contacts.html"
Now when the above code is added to a web page, It waits for 5 seconds and moves the contacts.html page. If you press the “back” button on your browser, the browser will take you to the previous page which is the “intro page” or the page that I have entered the above code.
But I need to stop that from happening(returning back to the intro page when the ‘back’ button on the browser is pressed). Is it possible to do so? If its possible, then how? o_O
You can use javascript to do this, but JavaScript isn’t foolproof because someone could turn off their javascript and bypass your mechanism.
Add this inside your and add
onload="preventHistoryBack()"to your -tag in your content.html:This will replace the complete history of the browser with your current location. So when the user hits the back button, it will go to the same page as he is now.