Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

153
Views
How to normally back in redirect case

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?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!