session.timeout after page is refreshed

Discussion in 'ASP .Net' started by Astrix, Aug 27, 2007.

  1. Astrix

    Astrix Guest

    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.
    Astrix, Aug 27, 2007
    #1
    1. Advertising

  2. On Aug 27, 8:01 pm, Astrix <> wrote:
    > 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.
    Alexey Smirnov, Aug 27, 2007
    #2
    1. Advertising

  3. Astrix

    Astrix Guest

    Thanks that's a good suggestion i will try that.

    Thankyou
    Astrix, Aug 28, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SiBNY0Q=?=

    sql server demo setup refreshed in each new session

    =?Utf-8?B?SiBNY0Q=?=, Feb 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    354
    Corey O'Mara
    Feb 7, 2004
  2. bruce barker

    Re: ASPX Page Timeout - Session Timeout

    bruce barker, Jul 20, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    11,109
    ASP.Confused
    Jul 20, 2004
  3. Replies:
    0
    Views:
    394
  4. ABC
    Replies:
    1
    Views:
    384
  5. Stefan Mueller

    Event wanted after page is refreshed

    Stefan Mueller, Dec 26, 2009, in forum: Javascript
    Replies:
    38
    Views:
    268
    Garrett Smith
    Jan 19, 2010
Loading...

Share This Page