Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

104
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda