Answer Posted / chaitanya
Sessions are the server side version of cookies. While a cookie preserves state at the client side, sessions preserves state at server side.
The session state is kept in a file or in a database at the server side. Each session is identified by a unique session id (SID). To make it possible to the client to identify himself to the server the SID must be created by the server and sent to the client whenever the client makes a request.
Session handling is done through the web.session module in the following manner:
import web.session session = web.session.start( option1, Option2,... )
session['myVariable'] = 'It can be requested'
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the best free ide for python?
How are arguments passed by value or by reference?
Explain list, tuple, set, and dictionary and provide at least one instance where each of these collection types can be used.
How do you iterate over a list and pull element indices at the same time?
What is dictionary in python?
What is python? What do you understand of pep 8?
How to save an image locally using python whose url address I already know?
Which linux is best for python programming?
What is n in python?
Difference between @staticmethod and @classmethod in python?
How do I run a python script in windows 10?
How do I run python?
What is composition in python?
Differentiate *args and **kwargs?
What is the encapsulation?