I want to send user to a certain link, there are 2 ways to getting there:
- 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
- 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