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

159
Views
`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
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!