Was going through Django Documentation and found this "https://docs.djangoproject.com/en/1.4/topics/http/sessions/#using-database-backed-sessions". What is the difference between database backed sessions and cookie based sessions? What is the advantage of one over the other? And what are the disadvantages?
A Session is used by websites to store application state for visitors across multiple page loads.
| Feature | Cookie Sessions | Database Sessions | |-------------------------------|-----------------|-------------------| | Works without database | Yes | No | | Can store sensitive user data | No* | Yes |
* Can store pointers referencing sensitive user data on the server, just not the sensitive data itself.
Both Cookie Sessions and Database Sessions work the same way, the only difference is where the data is stored. Django defaults to Database Sessions while Flask defaults to Cookie Sessions.
More information:
https://en.wikipedia.org/wiki/Session_(computer_science)
http://php.about.com/od/learnphp/qt/session_cookie.htm
http://wonko.com/post/why-you-probably-shouldnt-use-cookies-to-store-session-data
http://www.tuxradar.com/practicalphp/10/1/0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With