A session cookie is a temporary cookie that is not stored on the user’s hard drive but in the temporary memory of the browser. Thus, the session cookie is automatically erased when the browser window is closed or when the session has been inactive for some time - 20 or 30 minutes. The session cookie can only be used while the user is visiting the website.
When no date or lifetime is set for cookie creation then the cookie is created as a session cookie.
Session cookies are mainly used for storing session iD and for tracking what pages are seen during a visit. Session cookies allow visitors to browse a website whithout needing to register again on each page. There are also used on ecommerce sites to keep track of shopping cart content while browsing the website. For recovering a shopping cart on a subsequent visit, persistent cookies are used.
For more details about facts and usages, see cookie definition.