Session Timeout :- difference between Pressing F5 and selecting another page

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

Astrix

I have been working on session timeout for an application and I got a
lot of help from this discussion Board. My Thanks to all of you.

For e.g

If i have a website which has multiple pages, I open the first page
and then log to the second page and so forth.. Don't session timeout
value get reset each time we go to another page ?

I have noticed that if i go to the initial page and keep pressing F5
the page gets refreshed and the session timeout timer will start after
the last refresh done.

But this is not the case if i have a website with multiple pages..The
session timeout will start after i open the first page and no matter
if i keep browsing I still get reloaded to "Index.aspx" after 30
seconds using the code below

Response.AppendHeader("Refresh",Convert.ToString((Session.Timeout *
60) -1170) + ";URL=Index.aspx");

What is the difference between Refresh {Pressing F5} and getting
another page by clicking on the link.

Thank you,
astrix
 
Astrix said:
I have been working on session timeout for an application and I got a
lot of help from this discussion Board. My Thanks to all of you.

For e.g

If i have a website which has multiple pages, I open the first page
and then log to the second page and so forth.. Don't session timeout
value get reset each time we go to another page ?
Yes.

I have noticed that if i go to the initial page and keep pressing F5
the page gets refreshed and the session timeout timer will start after
the last refresh done.

But this is not the case if i have a website with multiple pages..

Yes, it is.
The
session timeout will start after i open the first page and no matter
if i keep browsing I still get reloaded to "Index.aspx" after 30
seconds using the code below

Response.AppendHeader("Refresh",Convert.ToString((Session.Timeout *
60) -1170) + ";URL=Index.aspx");

Of course you will be. The refresh will be triggered 30 seconds after
the page has been loaded, that has absolutely nothing to do with the
session timeout. The refresh is a function in the browser, it doesn't
know anything at all about the Sessions on the server.
What is the difference between Refresh {Pressing F5} and getting
another page by clicking on the link.

As far as the session timeout is concerned, none at all.
 
Not sure bit it looks like to me that you think that Session.Timeout is the
time to the end of the session ? This is a fixed value that holds the
duration for a session so your calculation will always give the same
value...
 
Back
Top