Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
How Many Cookies Can You Set
How Many Cookies Can You Set? - PHP Script Tips - Understanding and Managing Cookies
✍: 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.
2007-04-24, 4849👍, 0💬
Popular Posts:
How To Join a List of Keys with a List of Values into an Array? - PHP Script Tips - PHP Built-in Fun...
How To Control Vertical Alignment? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells By d...
Can we have shared events ? Yes, you can have shared event’s note only shared methods can raise shar...
How To Download and install PSP Evaluation? - PSP Tutorials - Fading Images to Background Colors wit...
How To Compare Two Strings with strcmp()? - PHP Script Tips - PHP Built-in Functions for Strings PHP...