![]() Showing Your CookiesIn the previous example, we read the value of one cookie from the server. Now we'll see how to write a script that reads all the cookies that came from your server and displays their names and values. If there are no cookies, the script says "There are no cookies here" (Figure 10.3). If there are cookies, it displays a line per cookie showing what's in the cookie (Figure 10.4). Script 10.5 shows you how. Figure 10.3. If there are no cookies from the server your Web page is on, you'll see this result.![]() Figure 10.4. If there are one or more cookies, then the script writes them into the document window.![]() Script 10.5. This script steps through and displays all of the cookies on your machine that have been set by a particular server.
To show all your cookies:
![]() |