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 there a switch or case statements in python?if not what is the reason for the same?
Explain about multi-threading concept in python?
Can python be used for automation?
What does while true do in python?
Which module(s) of python can be used to measure the performance of your application code?
How to create an empty class in python?
Is python faster than matlab?
How do you get the last value in a list or a tuple?
What is instance of a class?
What does the list comprehension do?
What is the dictionary?
Explain python list comprehension?
What are the features of python?
What are the programming-language features of python?
How are arguments passed by value or by reference?