Tools, FAQ, Tutorials:
Single Cookie Size Limit in PHP
How Large Can a Single Cookie Be in PHP?
✍: FYIcenter.com
How large can a single cookie be? 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, huge_cookies.php, to your Web server:
<?php if (isset($_COOKIE["HomeSite"])) { $value = $_COOKIE["HomeSite"]; } else { $value = ""; } $value .= "http://dev.FYICenter.com/php"; setcookie("HomeSite", $value); print("<pre>\n"); print("Large cookie set with ".strlen($value)." characters.\n"); print("</pre>\n"); ?>
Open your browser to this page for first time, you will see:
Large cookie set with 32 characters.
Click the refresh button, you will see:
Large cookie set with 64 characters.
Keep clicking the refresh button, you will see the limit of your browser.
⇒ Cookies Encoded during Transportation in PHP
⇐ Number of Cookies Supported in PHP
2016-10-30, 2103🔥, 0💬
Popular Posts:
Where to find tutorials on EPUB file format? I want to know how to create EPUB books. Here is a larg...
What is test testing area for? The testing area is provided to allow visitors to post testing commen...
What is EPUB 2.0 Metadata "dc:publisher" and "dc:rights" elements? EPUB 2.0 Metadata "dc:publisher" ...
What is EPUB 2.0 Metadata "dc:creator" and "dc:contributor" elements? EPUB 2.0 Metadata "dc:creator"...
How to Build my "sleep" Docker image from the Alpine image? I want the container to sleep for 10 hou...