Jump to content

Maximum cookie size?


dominod

Recommended Posts

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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.