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

257
Vistas
External JS mutates browser history in Vue application

In Vue 3 I have <component> which accepts html code that is response from backend. In that html, there is third party lib that has some methods that uses history.pushState which mutates how browser's back button is working.

Right now, when that component is initialised it doesn't add anything to browser history. Whenever some data changes and external components needs to recalculate, I see that history length is n + 3. This way, when I click back button nothing happens until it is click n times, as in browser history length. By the way URL doesn't change in any way.

My question is, is there anything that could be done to prevent those unwanted additions to browser history?

Tried to catch when user press back button with popstate event listener, but it doesn't do anything as nothing.

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