There is no Android back button on iOS, so you can go back by swiping right on the left edge. But now I want to disable this function in Safari, is it possible? That means the user can only go down step by step and cannot go back. After searching on Baidu, I found that they are all native iOS solutions. So can the web front-end use JavaScript to implement this function?
Unable to achieve.
After searching Google, there is no solution. You can consider using a single-page application to avoid this problem
Based on my understanding, I propose two methods, I don’t know if they will be useful to you
1. Each time the page is loaded, replace the referrer with the current URL or a fixed homepage URL, so that clicking return will stay on the current page or return directly to the homepage;
2. If the page is not too complicated, it can be made into one page, so that no matter how many next steps there are, they are all on the same page, and clicking return will return to the first page;
If you find a more effective way to reply I’ll be fine soon
You can try history to operate the browser’s history
Change the current page to the next page you want, so you won’t be able to return to the previous page.