session.timeout after page is refreshed

  • Thread starter Thread starter Astrix
  • Start date Start date
A

Astrix

Hi,

I am working on a problem w.r.t session.timeout

I have a code to redirect to this new page after 20 seconds.
Response.AppendHeader("Refresh", Convert.ToString((Session.Timeout *
60) - 1180) +"; URL=index.aspx");

Once the initial page is loaded, i start pressing "F5" to refresh the
page.
It was my understanding that the session.timeout will start after i
clicked the last "F5". But it appears as thou this is not the case the
page will get redirected to Index.aspx after 20 seconds from intial
load.

My objective is to get the session.timeout timer after the last page
refresh is done.

Thanks
Astix.
 
Hi,

I am working on a problem w.r.t session.timeout

I have a code to redirect to this new page after 20 seconds.
Response.AppendHeader("Refresh", Convert.ToString((Session.Timeout *
60) - 1180) +"; URL=index.aspx");

Once the initial page is loaded, i start pressing "F5" to refresh the
page.
It was my understanding that the session.timeout will start after i
clicked the last "F5". But it appears as thou this is not the case the
page will get redirected to Index.aspx after 20 seconds from intial
load.

My objective is to get the session.timeout timer after the last page
refresh is done.

Thanks
Astix.

I guess it's cached

try to force page refresh to see if it helps

Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");

I've tried your code and for some reasons it doesn't work in my IE7.
However, it works in Firefox 2. In IE7 it does redirect the page only
if you didn't hit F5. If you did, IE doesn't refresh the page at all.
The HTTP Header after F5 is the same and has "Refresh: 20;
URL=index.aspx" in it.
 
Back
Top