Home > Backend Development > PHP Tutorial > What does session mean?

What does session mean?

藏色散人
Release: 2023-04-04 14:18:01
Original
36114 people have browsed it

In the computer world, a session refers to a limited communication time between two systems. Some sessions involve a client and a server, and some sessions involve two personal computers.

What does session mean?

#What is session?

A session can be defined as a server-side storage of information that persists throughout a user's interaction with a website or web application.

Instead of storing large and ever-changing information via cookies in the user's browser, only a unique identifier (called a "session ID") is stored on the client side. This session ID is passed to the web server every time the browser makes an HTTP request (i.e. page link or AJAX request). The web application pairs this session ID with its internal database and retrieves the stored variables for use by the requested page.

A common type of client/server session is a Web or HTTP session. Every time you visit a website, your web browser starts an HTTP session. Although each page visit constitutes a separate session, the term is generally used to describe the entire time you spend on the website.

For example, when you purchase something on an e-commerce website, the entire process may be described as a session, even if you browse multiple different web pages.

Another example of a client/server session is an email or SMTP session. Whenever you check email using an email client such as Microsoft Outlook or Apple Mail, an SMTP session is started. This involves sending your account information to a mail server, checking for new mail, and downloading mail from the server. Once the messages are downloaded, the session is complete.

Examples of a session between two personal computers are an online chat or instant messaging session. This type of session involves two computers, but neither system is considered a server or client. Instead, this type of communication is called peer-to-peer or P2P. Another example of P2P communication is BitTorrent file sharing, where file downloads consist of one or more sessions with other computers on the BitTorrent network. A P2P session ends when the connection between the two systems is terminated.

This article is a detailed introduction to what session means. I hope it will be helpful to friends who need it!

The above is the detailed content of What does session mean?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template