3 ms·
That’s not how it works. You can’t just gloss over needing to use JS as if it were merely a different language that compiled to the same bytecode. I’m not talki
by ComputerGuru 7y ago
That’s not how it works. You can’t just gloss over needing to use JS as if it were merely a different language that compiled to the same bytecode. I’m not talking about complexity in terms of the number of frameworks or libraries you need to install. I’m talking about actual, measurable complexity in any objective metric you choose such as in terms of the number of distinct system, layers, hops, components, layers, etc you need to go through. There’s no comparing reading an http header included in the first lines of each and every request with the extremely brittle and objectively complex approach you are talking about.
JavaScript is absolutely not intended to function as a core part of merely making authenticated web requests between the browser and the server. I’m saddened by how often I need to explain this.
- austincheney 7y agoThat is not what I said. What I said was: The only reason to prefer an out-dated functionally obsolete technology is fear of disruption. If the reason for using an obsolete technology exists for selfishness more than the needs of the business, then yes, it is a form of incompetence even when that distinction is indistinguishable. JavaScript is a general purpose high level language that happens to natively run in the browser. My original point is that cookies are functionally obsolete and still in frequent use because developers are generally afraid of JavaScript. The more this conversation divests from authentication towards JavaScript the more credibility you lend my original opinion. It’s the same level of complexity either way because whether you use cookies or some other storage mechanism the business requirements around authentication remain the same the and the steps to accomplish those requirements are not so drastically different.
- ComputerGuru 7y agoI’m sorry, but as I have proven the two are not equal in complexity (among other things) then any future inference based on that assumption is void, most especially your assertion that the only reason people aren’t using LocalStorage over Cookies is because they’re somehow “afraid” of JavaScript. It’s like saying “the reason people don’t use apple juice to make mimosas and continue to use obsolete oranges is because they’re irrationally afraid of apple peelers.” Do you see how many things are wrong in that statement?
- austincheney 7y agoYou provide a vague list of terms, such as hops, but there was no proof provided. An example of a proof would be a measured comparison, for example: Do cookies require fewer network hops than an alternative storage mechanism. If so how many fewer?
- goto11 7y agoExample: Providing an identifier to a server. Cookies require one request: The identifier is automatically passed along with the initial request. Using localStorage and JavaScript: The first request is anonymous, the server return some JavaScript which reads the identifier from localStorage and pass it back to the server in a second request.
- benibela 7y agoI use NoScript, so if a site needs JavaScript, it does not work in my browser and I go to another site.