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

207
Visualizações
Chrome deletes the localstorage after closing the tab Vuejs

I am developing a web app with Vuejs, and i am using localstorage to store the jwt token , but after i close the tab I found that the token is lost and I need to login again . i tested the app on Opera GX and it is working just fine, i am having the issue only in Google Chrome.

This is how i set the token :

localStorage.setItem("token", token);

and this is how i load it :

let token = localStorage.getItem("token");
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I think the issue is from Chrome ,

you need to localstorage.getItem("X") befor you setItem("X","V")

and now the localstorage is persist , even after closing the browser .

this link helped me: Why isn't localStorage persisting in Chrome?

over 4 years ago · Santiago Trujillo 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