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

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
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

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.
 
P

Patrice

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top