I retrieve data on ajax call from database in mvc 4 project.I have to check session expiration on ajax call and I set timeout to 1 min..So I put following code in view:
<script type="text/javascript">
var someSessionVariable = '@Session["key"]';
if(someSessionVariable == "")
alert("Session expire");
else
alert("Session still exist");
</script>
Even after 1 min. I get value in someSessionVariable variable and Session still exist
alert message display.So how can I check session expiration in this condition.
Thanks