Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

258
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda