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
Is coding useful in finance?
What are the supported data types in python?
How would you randomize the contents of a list in-place?
What is the usage of help() function in python?
Is r easier than python?
What is the command to debug a python program?
Is python 0 indexed?
Explain relational operators in python?
Is cython as fast as c?
What is a generator in python?
How to find bugs or perform static analysis in a python application?
Define monkey patching?
Is javascript harder than python?
How are arguments passed - by reference or by value?
Does python sleep use cpu?