Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

163
Vistas
`window.location.href` in client vs `res.redirect` in express

I want to send user to a certain link, there are 2 ways to getting there:

  1. Browser Client Approach
  • I call express endpoint /redirect
  • It calculates the url to redirect to
  • It returns the url to redirect to
  • Client browser redirects via window.location.href
  1. Express Server Approach
  • I call express endpoint /redirect
  • It calculates the url to redirect to
  • It calls res.redirect(url)

Which is the best way? Is there any significant differences between these?

The current use case I'm looking into has documentation which showed the 2. express example. However I saw some use cases where the 1. browser approach is used

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda