 <p>Well you cannot actually get session time with an AJAX request as the request it self will also reset the session timeout time. What you can do is get it when you are rendering the page in a js function and start a counter with <code>setTimeout</code> when and show your message pop when less then 30 seconds left.</p>