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

158
Visualizações
Firefox with Vue.js redirecting to a wrong route

I need to jump to one of my page in a Vue.js project from another website to do the login, and then jumps back with token.
But now I encountered an issue with redirecting on Firefox.

This was the link I was trying to go:
https://www.host.com/admin/#/LoginPage?loginrul=selectportal.html%23%2Fsphome&type=login
But this is where Firefox actually taken me to:
https://www.host.cn/admin/#/sphome

What confuses me is that this issue appears only on Firefox, I will not encounter it both on Chrome nor IE.
It also does not appear when I enter the URL manually.

Any help will be appreciated.

the navigate message does not match with the url

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The problem is that Firefox selects the last decoded part of your url. %23%2F is the same as #/, while %23 is # and %2F /. So for Firefox not /LoginPage?loginrul=selectportal.html%23%2Fsphome&type=login is the url, instead it´s #/sphome&type=login. That this part is decoded doesn´t mean it doesn´t get interpreted by a browser.

Maybe Chrome and IE using the first hash as their entry. But that was just lucky. You need to get rid of your hash, you can achieve this by adding this to your router:

const router = new VueRouter({
  mode: 'history'
})
about 4 years ago · Juan Pablo Isaza Relatório
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