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

217
Views
¿Debo usar window.location.replace('/') o window.location.href=window.location.origin en el proceso de cierre de sesión?

En un botón de cierre de sesión, ¿debería usar window.location.replace('/') o window.location.href=window.location.origin . ¿Cuál es la diferencia entre estos dos métodos? Sé que ambos borran el href actual del historial, por lo que el usuario no podrá acceder a la URL después de cerrar la sesión con cualquiera de ellos.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

si está utilizando next.js, puede usar next/router, que es un mejor enfoque.

 import { useRouter } from 'next/router' const router = useRouter() //and then you can do it like this router.replace('/') //or router.push('/')
about 4 years ago · Juan Pablo Isaza 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!