How many cookies?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Stoyanski
Forum Newbie
Posts: 15
Joined: Sun Jun 02, 2002 9:33 am
Location: BG
Contact:

How many cookies?

Post by Stoyanski »

How many cookies can I sent?
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

1 i think, i would only use 1 cookie to store anythig i want.....but i am not sure you might wanna check that out first.

by 1 i mean you can send only 1 cookie PER page, that's what i do and i think, i could be wrong :roll: .
User avatar
mikeq
Forum Regular
Posts: 512
Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland

Post by mikeq »

A webserver can store a maximum of 20 cookies per client.

Generally it is best to only use 1 cookie with some sort of ID in it, then look up any other information needed in a database.

Mike
User avatar
sam
Forum Contributor
Posts: 217
Joined: Thu Apr 18, 2002 11:11 pm
Location: Northern California
Contact:

Post by sam »

To elaborate on what the others have said you can serialize an array and send it as your cookie to store larger amounts of data, remember that any data you set will have to be sent every time a page is accessed so I will hog bandwidth if you send lots of data.

Cheers Sam
Stoyanski
Forum Newbie
Posts: 15
Joined: Sun Jun 02, 2002 9:33 am
Location: BG
Contact:

Post by Stoyanski »

Actually I'm sending a arrayed cookie. Thanks a lot boys.
Post Reply