roeya
Posts: 181
|
Posted: 06/07/2009, 11:06 PM |
|
Important observation regarding cookies and Perl
CCSetCookie can create a cookie with the same name several times. It is not checking if the cookie exists it just creates a new cookie and insert it to the cookie array that will be send to the browser.
If you use a cookie in the program as a state variable that changes during the run like this:
before show row
CCSetCookie('last_item', $Component->{id}->GetValue());
You will have many cookies with the same name one after the other – no exactly what you expected.
So never use SetCookie for the same cookie in a loop of some kind as the cookie is not replaced it is added and there is a limit to the number of cookies that can be used per domain (~40 depends on browser and version)
_________________
http://www.infoneto.com/ |
|
|
|