I’ve seen some questions about e.g redirecting to the calling page
but the general suggestion is to pass in the redirect url as a parameter or check the referrer url.
1. Are these really the only 2 solutions?
2. What about keeping track of the latest page visited.. Is that viable and/or possible?
3. Any other options?
Forgot to add I need to stay away from javascript
Sometimes the referrer is not possible. Imagine a login form that does some validation, you enter the wrong password, it comes back with a red error message, and then the referrer is wrong. Of course, in that case, the query string solution would work.
But alternatively, you can
(I’m not saying that these options are good or bad, they’re all I could think of right now)