# Network error once session is expired

**URL:** <https://meta.discourse.org/t/network-error-once-session-is-expired/74485>\
**Category:** Feature\
**Created:** [November 21, 2017, 5:46am UTC](https://meta.discourse.org/t/network-error-once-session-is-expired/74485 "2017-11-21T05:46:18Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [November 22, 2017, 1:29am UTC](https://meta.discourse.org/t/network-error-once-session-is-expired/74485/13 "2017-11-22T01:29:28Z")

</div>

I had this exact same problem. That was one of the reasons I did the PR for a shorter session in the first place.

When the session cookies expires Discourse get’s crazy. A public topic will get loaded, but timings, notifications and everything will start to fail silently and will eventually break.

Ideally we would have a exception treatment in our Discourse.ajax function that would popup saying that the session expired, click to refresh/login.

This would help enterprise setups with small sessions (because of IT audits or shared computers) and tab hoarders alike.

We just need to be careful to capture this correctly. I think it’s when your xhr gets a 302 with location being `${Discourse.base_url}\login`.

---

_[View the full topic](https://meta.discourse.org/t/network-error-once-session-is-expired/74485)._
