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

102
Views
How do i change app path without reloading app

I want the code injected by my chrome extension to update the users pathname without reloading the users app.

Currently i've got a work around

window.history.pushState('', '', '/about')
setTimeout(() => window.history.back(), 10)
setTimeout(() => window.history.forward(), 20)
window.history.pushState('', '', '/about')

Is there a better way of doing this ? maybe i don't understand history state well enough.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

window.history.replaceState("", "", "/data") this changes the path without reloading the page but you have to handle the page refresh on the index file

and you can append new data by

window.history.replaceState("", "", "/data"); fetch('DataPage.html').then((res) => res.text()).then(res => {document.querySelector("#target").innerHTML = res;})

You have to place a element with id like <div id="target"></div>

about 4 years ago · Juan Pablo Isaza Report
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!