Many times when you apply for an exam or fill in a volunteer, do you have to fill in the page information after you have considered it for a while, but the page expiration is displayed when you submit it, and you have to enter it again quickly; however, it takes a long time to write a blog, but this is not the case and there is real-time automatic storage; this involves the session expiration time;
When the user cannot predict the time of page operation, the session will never expire.
Copy codeThe Code is as follows:
<Script src = "js/Jquery1.7.js" type = "text/javascript"> </script>
<Script type = "text/javascript">
$ (Function (){
Function post (){
$. Ajax ({
Type: "post ",
ContentType: "application/json ",
Url: "WebBlock. aspx"
})
}
SetInterval (post, 30000 );
})
</Script>
Visit this page every half minute! Therefore, the session will not expire (if the session expires for more than half a minute );