Live data from Hacker News

SPAs Are Dead?

leastprivilege.com

1–10 of 118 posts

Re: SPAs Are Dead?

#2
Maybe I'm missing something, but this seems like a very narrow definition of SPA. A SPA can just sit on a different path from the API server and cross-site cookies aren't a problem. For instance, www.example.com/app and www.example.com/api

Re: SPAs Are Dead?

#3
post #2

Maybe I'm missing something, but this seems like a very narrow definition of SPA. A SPA can just sit on a different path from the API server and cross-site cookies aren't a problem. For instance, www.example.com/app and www.example.com/api

This is how I prefer to do it. No CORS pre-flight requests and messing with CORS settings

Re: SPAs Are Dead?

#4
Cookies suck. The interface is beyond terrible, they were never scoped properly, and they don't have to be used.

Browser storage (sessionStorage, localStorage) is perfectly valid for storing an authentication token.

Re: SPAs Are Dead?

#5
post #2

Maybe I'm missing something, but this seems like a very narrow definition of SPA. A SPA can just sit on a different path from the API server and cross-site cookies aren't a problem. For instance, www.example.com/app and www.example.com/api

This is how I prefer to do it. No CORS pre-flight requests and messing with CORS settings

Seconding (thirding?) this.

I'm curious, are there any SPAs that aren't done this way?

Re: SPAs Are Dead?

#7

Earlier quoted context omitted.

This is how I prefer to do it. No CORS pre-flight requests and messing with CORS settings

Seconding (thirding?) this. I'm curious, are there any SPAs that aren't done this way?

app.example.com vs api.example.com ?

Re: SPAs Are Dead?

#8
Sounds like an overreaction. The only thing affected by the browser changes is some third party authentication mechanisms, and those can be easily fixed (as mentioned in the article itself).

Re: SPAs Are Dead?

#10

Cookies suck. The interface is beyond terrible, they were never scoped properly, and they don't have to be used. Browser storage (sessionStorage, localStorage) is perfectly valid for storing an authentication token.

By interface you mean.. the HTTP protocol? At least they can be scoped on the domain level. Browser storage can't.
Post reply on HN