Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Session IDs are virtually identical to cookies in functionality, with one big difference: when you close your browser (or restart), session ID information is (usually) no longer stored on your hard drive. Figure 6-33 illustrates. The website you were interacting with may remember your data or actions, but it cannot retrieve session IDs from your machine that don’t persist (and session IDs by default expire when the browser shuts down). In essence, session IDs are like temporary cookies (although, as you’ll see shortly, there are options to control this).
Although technically speaking, session IDs are just a form of
cookie without an expiration date, it is possible to set session IDs
with expiration dates similar to cookies (going out decades). In this
sense, they are virtually identical to cookies. Session IDs do come with
an important caveat, though: they are frequently passed in the URL
string, which can create serious problems for search engines (as every
request produces a unique URL with duplicate content). A simple fix is
to use the canonical tag (which we’ll
discuss in Content Delivery and Search Spider Control)
to tell the search engines that you want them to ignore the session
IDs.