Re:
by nurettin on Friday November 29, 2024 @01:13PM
(#42275767)
You give up server redirects and cookie auth. (well you don't lose cookie auth, but you need extra steps for it to prevent CSRF)
[ Parent
| on HN ]
Re:
by stackghost on Friday November 29, 2024 @02:11PM
(#42276220)
You can just have the server return a json object instructing the frontend to navigate, accomplishing server redirects.
Javascript can do browser redirects, but those are not actual 301 HTTP redirects.
Re:
by stackghost on Friday November 29, 2024 @08:44PM
(#42278743)
Yes, what I'm saying is that you can have the backend return e.g. "{ "response": 301, "redirectUrl": "https://example.com" }", and then have the frontend handle that properly, and you get the functional equivalent.
I'm aware that it is different under the hood.