Session and URL problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stephen

    #1

    Session and URL problem

    HI,

    I have created an application that has a logout.aspx page. here I clear the
    session variables and redirect the user to the login page, but if I dont
    close the brower and hit the "back" button. the user is directed to the old
    pages.
    How do i avoid this?

    Please advice,
    Stephen


  • Joerg Jooss

    #2
    Re: Session and URL problem

    Stephen wrote:[color=blue]
    > HI,
    >
    > I have created an application that has a logout.aspx page. here I
    > clear the session variables and redirect the user to the login page,
    > but if I dont close the brower and hit the "back" button. the user is
    > directed to the old pages.[/color]

    Make your pages non-cacheable by issueing the page directive

    <% @OutputCache Location="none" %>

    or setting the appropriate HTTP headers manually.

    (Note that this only works if a browser applies the cache control headers to
    its internal history, like IE.)

    Also make sure to properly set up directory access security in your
    web.config.

    Cheers,

    --
    Joerg Jooss
    joerg.jooss@gmx .net

    Comment

    Working...