Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How Large Can a Single Cookie Be
How Large Can a Single Cookie Be? - PHP Script Tips - Understanding and Managing Cookies
✍: 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/faq/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.
2007-04-24, 8805👍, 0💬
Popular Posts:
How was XML handled during COM times? During COM it was done by using MSXML 4.0. So old languages li...
How To Change System Global Area (SGA)? - Oracle DBA FAQ - Introduction to Oracle Database 10g Expre...
How To Enter Binary Numbers in SQL Statements? - MySQL FAQs - Introduction to SQL Basics If you want...
What Is a LABEL Tag/Element? - XHTML 1.0 Tutorials - Understanding Forms and Input Fields A "label" ...
Write out a function that prints out all the permutations of a string. For example, abc would give y...