QuakeLive Posted January 22, 2014 Share Posted January 22, 2014 Hi, Here are two quotes from Creating Cookie Library example: Begin looping through the cookies: for (var i = 0, count = cookies.length; i < count; i++) { var value = (cookies.slice(0,1) == ‘ ‘) ? cookies.slice(1) : cookies; ... some browsers add a space in between the cookie values in document.cookie. Decode the value: value = decodeURIComponent(value); Would not it be better if instead of "cookie values" we use just "cookies" (... some browsers add a space in between the cookies in document.cookie. ) and "Decode the cookie" instead of "Decode the value"? Is it correct to say that "some browsers add a space in between the cookies in document.cookie" INSTEAD OF "some browsers add a space in between the cookie values in document.cookie" ??? Thank you in advance! Link to comment Share on other sites More sharing options...
Larry Posted January 22, 2014 Share Posted January 22, 2014 I dunno. I think those are rather minor differences. But if you like it your way, that's fine, too. 1 Link to comment Share on other sites More sharing options...
QuakeLive Posted January 23, 2014 Author Share Posted January 23, 2014 I dunno. I think those are rather minor differences. But if you like it your way, that's fine, too. Thanks. I think that using "Cookies" instead of "Cookie values" is more correct (in the quotes above), because "cookie value" is just a part of the cookie (name-value, duration... )... but not sure, and it does not seem so important... Anyway, thank you again! Link to comment Share on other sites More sharing options...
HartleySan Posted January 23, 2014 Share Posted January 23, 2014 QuakeLive, I have to agree with Larry on this one that you're splitting semantic hairs. I don't think it really matters one way versus the other, as they mean the same thing. Of course, your argument that a single cookie string is a name-value combination is valid, but still, I think that context more often than not clears up any ambiguity about what "cookie value" is referring to. 1 Link to comment Share on other sites More sharing options...
QuakeLive Posted January 23, 2014 Author Share Posted January 23, 2014 At the beginning, I thought that I didn't understand some things about cookies well and that's why I asked: Is it correct to say that "some browsers add a space in between the cookies in document.cookie" INSTEAD OF "some browsers add a space in between the cookie values in document.cookie" ??? After that, I just gave my opinion, "splitting semantic-hairs" (or some kind of provocation by trying to find someone else's mistake) was not my intention. Anyway, now it is clear, thank you very much HartleySan and Larry! Link to comment Share on other sites More sharing options...
HartleySan Posted January 23, 2014 Share Posted January 23, 2014 I knew you weren't trying to point out someone's mistakes, but if you go back and read your original post, I think you might see that your tone was a bit confusing and somewhat implied that. Anyway, I don't think it's a big deal. I just personally think that "cookie value" can mean several things, and the context always clears things up. 1 Link to comment Share on other sites More sharing options...
QuakeLive Posted January 23, 2014 Author Share Posted January 23, 2014 I think you might see that your tone was a bit confusing and somewhat implied that. I apologize for that Link to comment Share on other sites More sharing options...
Recommended Posts