Case 1:
In mypage1: window.open('http://mypage2', '_self');
In mypage2: window.open('http://mypage3', '_self');
Click back: to mypage2
Click back: to mypage1
That's ok.
Case 2:
In mypage1: window.open('http://mypage2', '_self');
In mypage2: window.location.replace('http://mypage3’);
Click back: to mypage1
That's ok.
Case 3:
In mypage1: window.open('http://mypage2', '_self');
In mypage2: send form POST (not ajax) to some url, say http://postapi
In postapi(server api): redirect to mypage3.
Click back: to mypage2, then will be directed to mypage3 immediately.
That's not my expectation.
Try
If I set window.location.replace('http://mypage1’), the mypage1 will be shown. But click back, the redirect show again.
I hope the browser only know mypage1, and ignore mypage2 and mypage3.
Any suggestion ?
There would be a circle in case 3. I expect that it can return to mypage1 from mypage3 when click back.
(You can consider mypage2 as a temporary page)
How can I resolve it?