|
I want to write some tracking information to a cookie. When the cookie reaches it's max size I want to overwrite the final value or 2.
How do I check the size of a cookie though.
|
|
|
|
|
I guess the logical solution is to read the cookie into a string and check the length of the string using the LEN() Function.
As long as you know waht the MAX permitted cookie size is, its simple to know if its at the maximum size.
|
|
|
|
|
Thanks for the advice.
What I've done is check for a little less than the max value though to allow for the other information (expiry etc) that is written with the cookie data.
|
|
|
|
|
Given that you know already the NAME and VALUE of the data to be written to the cookie,
Its not so difficult to check the length of the data (to be written) including the name and then subtract that from the maximum size allowable for the cookie and then you will know EXACTLY how space you have remaining (in the cookie) to work with.
|
|
|
|