Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
546 views
in Technique[技术] by (71.8m points)

jquery - Does Session timeout reset on every request

Does Session timeout reset on every request regardless of whether we check sessions variables? Or we should use atleast one session variables?

Does Ajax request cause resetting session timeout? like Update Panel ,jQuery ajax ,...

thanks


Edit 1)

Does HTTP Get cause resetting session timeout??

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Does Session timeout reset on every request regardless of whether we check sessions variables?

Session will not expire if you keep on calling server side code. The session time out will be resetting on each request to server. On subsequent requests to the same web site, the browser supplies the ASP.NET_SessionId Cookie which the server side module uses to access session value(like user information).

---------------------------------------------------------------------------------
                     How to detect the Session TimeOut
---------------------------------------------------------------------------------

enter image description here

---------------------------------------------------------------------------------

Question - 2 - Does Ajax request cause resetting session timeout? like Update Panel ,jQuery ajax ,...

Question - 3 - Does HTTP Get cause resetting session timeout??

Session will expire in case user waited too long between requests. Session will not expire if you keep on calling server side code. The session time out will be be resetting on each request to server

Web.Config

<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" 
 sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
    cookieless="true" timeout="1" />

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...