Я хочу автоматически уничтожить сеанс через 1 минуту. но session.timeout не работает для меня. Просмотрите мой код.Уничтожить сеанс после таймаута
Create.asp
<%
Session.Contents.RemoveAll()
Session("page") = "Active"
Session.timeout = 1
Response.Redirect "time.asp"
%>
Time.asp
<%
Response.Write(Session("page"))
if Session("page") = "Active" then
Response.Write("Session is Active,This Page will Expire After 1 mintue ")
%>
<h2> Time Out: <span id="timerLabel" runat="server">65</span> </h2>
<script type="text/javascript">
function countdown()
{
seconds = document.getElementById("timerLabel").innerHTML;
if (seconds > 0) {
document.getElementById("timerLabel").innerHTML = seconds - 1;
setTimeout("countdown()", 1000);
} else { location.reload(); }
}
setTimeout("countdown()", 1000);
</script>
<% else %>
<a href='create.asp'> Click Here to Create Session </a>
<% End if %>