dominod Posted August 22, 2010 Share Posted August 22, 2010 Hi I know that maximum size of one cookie is 4Kb.. That is kilobytes right? and not kilobit? And a byte is 8 bits right? So if I have "Hello" in my cookie thats 5 characters which means the cookie is 5 x 8 = 40 bit which is again 5 bytes (?). Does this mean that I can have a maximum of 4000 characters in my cookie? Or did I miss something here? Thanks Quote Link to comment Share on other sites More sharing options...
MadTechie Posted August 22, 2010 Share Posted August 22, 2010 Sounds about right to me Quote Link to comment Share on other sites More sharing options...
premiso Posted August 22, 2010 Share Posted August 22, 2010 Sounds right, but why would you want to store so much data in a cookie? Surely sessions would be a better utility to use. Quote Link to comment Share on other sites More sharing options...
GoneNowBye Posted August 22, 2010 Share Posted August 22, 2010 dont use sessions, a cookie is a high enough level interface. but if you want to store variables in the cookie, i recomend, storing the variables server side, and the cookie can be a hash, or an id, to a row in a table, and read them off there.... this also allows data to be ip checked - stop cookie theives, 'cept for the ones in the same house. Quote Link to comment Share on other sites More sharing options...
premiso Posted August 22, 2010 Share Posted August 22, 2010 dont use sessions, a cookie is a high enough level interface. Why would you not want to use sessions? Just curious as to your logic behind that statement. i recomend, storing the variables server side You do realize that is what session data does...stores information on the server right? Quote Link to comment Share on other sites More sharing options...
Mchl Posted August 22, 2010 Share Posted August 22, 2010 dont use sessions, a cookie is a high enough level interface. What's that even supposed to mean?? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.