Search code examples
djangosessioncookiesdjango-sessions

Django, relying on sessions


Less or more I am building my site heavly on sessions(especially for redirecting users etc), I am curious if this a dangerous practice. What would be the rough percentage of users who have disabled their cookie saving with their browsers ? I am open to any suggestions :)

Thanks


Solution

  • The main issue with sessions is not the disabled cookies. The main argument against sessions is that they make your app stateful. Stateless services have some advantages.

    The related argument is performance: sessions are often the bottleneck for sites under high load, they make it harder to use caching and imply reading or writing to storage for each request.

    It is fine to use sessions when they are needed but it is better to avoid them if you can.