Java Reference
In-Depth Information
After you have fi nished, close the cookie and click OK on the dialog boxes to return to the browser.
Now let's load the FreshBakedCookie.htm page into your IE browser. This will set a cookie. Let's see
how it has changed things:
1.
Return to the Internet Options dialog box (by choosing Tools
Internet Options).
2.
Click the Settings button.
3.
Click View Files. Your computer now shows something like the information in Figure 11-7.
Figure 11-7
Because you are creating a cookie from a web page stored on the local hard drive rather than a server,
its domain name has been set to the name of the directory the web page is stored in. Obviously, this is a
little artifi cial. In reality, people will be loading your web pages from your web site on the Internet and
not off your local hard drive. The Internet address is based on the directory the FreshBakedCookie.htm
fi le was in. You can also see that it expires on December 28, 2020, as you specifi ed when you created the
cookie. Double-click the cookie to view its contents, which look like those in Figure 11-8.
You can see the name you gave to the cookie at the left, UserName , its value, Paul , and also the direc-
tory it's applicable to. The expiration date is there as well; it's just not in an easily recognizable form.
Note that you may sometimes need to close the browser and reopen it before you see the cookie fi le.
Search WWH ::




Custom Search