• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 15. Using Head Elements > Editing Head Elements

Editing Head Elements

After you insert a head element, you can edit its content in the Properties inspector. Click on a head icon in the Document window toolbar, or double-click it to make the Property inspector appear. Editing each type of tag is discussed in the relevant section.

Cookie, Cookie, Cookie, Starts with Meta

Cookies are little markers that Web sites drop onto their visitors’ computers that tell them, at the least, that the visitor has been to the site before. Of course, cookies aren’t an exact science—the visitor has to be using the same browser on the same computer or the cookie doesn’t track them. (In some cases, the user must use the same login name, in addition to the same browser and computer, before a cookie activates.)

There are a few security concerns about cookies—it’s very difficult for the user to tell what information the cookie is tracking, or for the user to ensure that the cookie is retrieving only itself and not other private data. On the other hand, cookies are quite useful for remembering login names for sites that require user registration.

One method for setting a cookie—that is, leaving a note in the user’s “cookies.txt” file—is to set it with a meta tag. An example tag is the following:

<META HTTP-EQUIV="Set-Cookie" CONTENT="cookievalue=xxx; expires=Wednesday, 21-Aug-02 18:21:21 GMT; path=/">


Above, xxx is the value of your cookie. The expires attribute, discussed earlier in this chapter, sets the expiration date for the cookie itself. The path is the path you want the cookie to mark; the slash above is for the root page, but you could also set it for a specific page within the site.

See Cookies and Code Snippets in Chapter 13 to set a cookie using JavaScript. For more about cookies, on both sides of the debate—including how to use them to track users, editorials and news about privacy concerns, and useful examples—see http://www.cookiecentral.com/.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint