Session sliding expiration override for certain requests

Yess
Člen | 16
+
0
-

Hello,

Is there some way to override default behaviour of session – sliding expiration?

For example i have some ajax requests which are executed every N seconds (to refresh actual data on screen). But these requests prevents session expiration set while logged in, so user is never signed out by INACTIVITY reason.

Thanks for help.

David Grudl
Nette Core | 8218
+
0
-

The ideal solution is probably not to start a session in AJAX requests.

CZechBoY
Člen | 3608
+
0
-

Or handle expiration sliding on your own.

Raek
Člen | 5
+
0
-

@DavidGrudl can you show some example how to implement this ideal solution if i need to verify user even at ajax request?

Editoval Raek (15. 5. 2019 13:38)