Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

strategicsdemexico's avatar

How to get the session remaining time

How to get the session remaining time, to show in the view?

0 likes
2 replies
d3xt3r's avatar
d3xt3r
Best Answer
Level 29

what do you mean? the session will only expire if its kept idle for certain amount of time,( default 120 minutes).

So on every page load you can start counting down from (120 minutes or the default you have set) .

1 like
lyleyboy's avatar

Hey,

I'm looking for the exact same thing. I have a multipage form which stores state in session and could potentially take the user a good time to complete.

I'm considering changing the storage to cookie or maybe localstorage. Not sure.

Help / Advice would be greatly appreciated.

Please or to participate in this conversation.