我有一个application.cfc,我告诉程序我希望会话超时像这样一小时:
<cfset this.sessionTimeout = "#createTimeSpan(0,1,0,0)#">
然后在其他页面上,我尝试在超时结束时设置警告
<!---Session Timeout Warning Pop up set to 1 hour--->
<cfset sessionTimeout = 60>
<!---Warning 1 minute before Session will timeout--->
<script>
<cfoutput>
var #toScript((sessionTimeout-1)*60*1000,"sTimeout")#
</cfoutput>
setTimeout('sessionWarning()', sTimeout);
function sessionWarning() {
alert('ATTENTION: Your session will time out shortly do to inactivity.');
}
</script>
<!---End of Warning--->
出于某种原因,超时时间不会超过59分钟。我错过了什么吗?