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

224
Views
Navigating through browser history stalls when pages have same path but different parameters

I'm on page www.example.com/display_results?data=somedata and from that page I navigate to a second page using:

window.location.href = "www.example.com/display_results?data=moredata"

From the second page, I then navigate to a third page using:

window.location.href = "www.example.com/display_results?data=evenmoredata"

When I try to navigate back (using the browser back button) from the third page to the second page, it stalls at window.location.href = ... If I hit reload (ctrl-F5) the second page reloads. Now I can navigate back and forth between the second and third pages. When I try to navigate back to the first page it stalls at window.location.href = ... If I hit refresh, that page appears and I can now navigate back and forth from the first to second to third pages with no stalling.

I suspect my problem is tied to the fact you can't use window.location.href to redirect to a URL with the same path. In my case the parameter changes, so it works as expected, but seems to have issues when navigating through history.

I use nearly identical code to navigate to pages with entirely different paths and it works just fine. In case it matters, this is in a flask app and I'm using jQuery and Bootstrap 5.

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!