A session cookie is a file containing an identifier (a string of letters and numbers) that a website server sends to a browser for temporary use during a limited timeframe.
Session cookies are enabled by default. Their purpose is help individual web pages load faster and improve navigation through a website. Each time the browser requests a web page from the server, it includes the session cookie file with its request. The cookie lets the server know which page components the browser has already been sent, so the server doesn't waste time re-sending them. When the browser closes at the end of a session, the file is deleted.
A session cookie is also known as transient cookie. This type of cookie is stored in temporary memory and is only available during an active browser session. End users can adjust browser settings to decline session cookies, however this often results in a poor user experience.
A common example of a session cookie in action is in the shopping cart feature found on most e-commerce websites. The session cookie stores the items that the user has added to their cart so so as they browse through the site, the items in the cart will follow them. Without a session cookie, when a user went to the checkout page, items would disappear from the shopping cart because the new page would not recognize prior activities on the website.
If a user wants to retain items in their shopping cart so they can be viewed in a future session, they will need to accept the website's persistent cookies. Persistent cookies are stored in long-term memory and contain information about the specific user. Persistent cookies require the user’s permission before they can be stored on the user’s web browser.