Introduction
CherryPy is an object-oriented web application framework that uses the computer language Python. Although it covers the HTTP protocol and enables rapid development of web applications, it is still low level and only offers the features listed in RFC 7231. With its Create, Retrieve, Update, and Delete functionalities, this framework is primarily for programmers who want to use Python to build portable database-driven web applications.
This blog explains the details of session tracking and the details of tracking the end-user’s activity in CherryPy.
Without further ado, let's get started.
Session Tracking
User requests are tracked, and their state is kept up to date using session tracking. It is a system for keeping data on certain users and identifying their requests when connecting to the web server. Each request made to the server using the stateless HTTP protocol is handled as a fresh request.
Cookies, URL rewriting, and hidden form fields are just a few methods for tracking user sessions.
Cookies
A cookie is a special ID given to customers after their initial visit to a website. This client will deliver the cookie that the server previously provided whenever it reconnects to the server. When that happens, the server will realise it is the same person.
Hidden form fields
When submitting a request to the server, hidden form fields are utilised to add information, such as a special ID. Although the user cannot see these fields, the server can identify the client because every time a request is made, the server also includes the client's unique ID.
URL rewriting
When a URL is rewritten, a special session ID is added to the URL before it is sent to the server. Since the session ID is a component of the URL, users may see it right away.







