News for hackers. Stuff that matters.
Re:You don't need that CORS request by lostcolony on Monday January 03, 2022 @01:29PM (#29784309)
Because if you're re-examining your need of CORS and evaluating whether it makes sense to instead host everything from the same host, you can also re-examine your need of an SPA and evaluate whether it makes sense to instead just render everything server side; it'll solve even more problems if you can.
Re:You don't need that CORS request by rattlesnakedave on Monday January 03, 2022 @01:38PM (#29784450)
> it'll solve even more problems

Wow. Why doesn’t everyone do this?

Re:You don't need that CORS request by igammarays on Monday January 03, 2022 @01:47PM (#29784577)
Actually, a lot of people do. Ever heard of Laravel, Django or Ruby or Rails? Outside of the React/JS world, a lot of developers are happy solving real business problems instead of working with hacks that were built on top of browser DOMs.
Re:You don't need that CORS request by lostcolony on Monday January 03, 2022 @03:57PM (#29786766)
I mean, to be a bit more charitable, when you have use cases that require server pushes, the traditional server rendered pages don't work so well, and that is where SPAs make sense. Mind you, a lot of the frameworks for rendering server side have started to include natural ways of handling those updates (Phoenix Liveview for instance being one I'm familiar with), that makes it so you likely don't need an SPA in those situations, but there are still use cases where an SPA may be simpler or may enable a UX that otherwise would not be possible.

But to the apparently snide response to my original comment, while there may be reasons for SPAs, there are also plenty of uses of them that could be more simply done via server side rendering, especially with the place such frameworks have moved towards, in enabling server pushed updates.

Re:You don't need that CORS request by rattlesnakedave on Monday January 03, 2022 @01:50PM (#29784626)
That’s great to hear. Hopefully I can grow up to be one of them some day.
Re:You don't need that CORS request by Nextgrid on Monday January 03, 2022 @11:45PM (#29791437)
Some people's careers are based on JS frameworks and managing (or perpetuating) frontend complexity. How many will voluntarily put themselves out of a job?