简体   繁体   中英

remove previous page URL from browser history

I am working on a web app where in this URL http://127.0.0.1:8887/#/allmembers i show all the members and on click of add new member button in the same page i will redirect to new member creation page and URL is http://127.0.0.1:8887/#/newpractice on new member creation success i will redirect it back to all members page. Here if i click the browser back button it will again take me to new member creation page.So is there any way so that i can remove the previous page URL from browser history.

You should try implementing a session ID so the user can't go back to the form and submit it again, (by comparing current session and previous id session). And follow the Post/Redirect/Get pattern so you avoid submitting same data twice in a row. But you can't just disable the back button and you shouldn't do that anyway.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM