Ajax Session check

Hello All,

How to check user session through AJAX.

I’ve started an Ajax call on every 15sec to check user session. Ajax call is working but it renewing session too. That’s why session is never expiring.

Please share any idea.

Why do you need to check every 15 seconds, that will cause a lot of traffic.

If this is to check a user is still logged in before posting a form why not just check the session before the post.