3 ms·
I have defined complexity for you several times. Complexity is not hard just as simplicity is not easy. Just because some framework running on the server hides
by austincheney 7y ago
I have defined complexity for you several times. Complexity is not hard just as simplicity is not easy. Just because some framework running on the server hides the challenges from you does not mean the complexity is lower. The complexity is dictated by the business requirements (the problem state).
- ComputerGuru 7y agoYou’re not getting it. You don’t need any intermediary framework or library to store state in cookies from the backend. You can do it without executing anything on the client. With LS, you are forced architecturally to execute code on the backend and in the browser just to accomplish the same thing. They’re incomparable.
- goto11 7y agoConsider when you are visiting a page where you have been before, and you have received some identifier token. Using cookies, the browser automatically sends the identifier token along with the initial request, and the server can serve the initial response based on your identity. With localStorage, the browser initially send an anonymous request to the server, the server then have to return some bootstrap JavaScript which reads the identity token from localStorage and then passes it to the server in the next request, and only then the server can respond based on your identity. By any reasonable definition, the second approach is more complex, not to mention slower and more fragile.