Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!