Tools, FAQ, Tutorials:
Number of Cookies Supported in PHP
How Many Cookies Can You Set in PHP?
✍: FYIcenter.com
How many cookies can you set in your PHP page? The answer is depending what is the Web browser your visitor is using. Each browser has its own limit:
If you want to test this limit, copy this sample script, how_many_cookies.php, to your Web server:
<?php
$count = count($_COOKIE);
$name = "Cookie_".($count+1);
$value = "FYICenter.com";
setcookie($name, $value);
print("<pre>\n");
print("One cookies were added.\n");
print("$count cookies received.\n");
foreach ($_COOKIE as $name => $value) {
print " $name = $value\n";
}
print("</pre>\n");
?>
Open your browser to this page for first time, you will see:
One cookies were added. 0 cookies received.
Click the refresh button, you will see:
One cookies were added. 1 cookies received. Cookie_1 = FYICenter.com
Keep clicking the refresh button, you will see the limit of your browser.
⇒ Single Cookie Size Limit in PHP
⇐ Firefox Storing Persistent Cookies in PHP
2016-10-30, ∼2501🔥, 0💬
Popular Posts:
Where to find tutorials on Python programming language? I want to learn Python. Here is a large coll...
How to use the JSON to XML Conversion Tool at freeformatter.com? If you want to try the JSON to XML ...
Why I am getting "The Windows SDK version 8.1 was not found" error, when building my C++ application...
How To Pass Arrays By References? in PHP? Like normal variables, you can pass an array by reference ...
How to dump (or encode, serialize) a Python object into a JSON string using json.dumps()? The json.d...