refresh and session

Discussion in 'ASP General' started by earl, Oct 28, 2003.

  1. earl

    earl Guest

    If I logout of my websie I run the session.abandon command that is
    supposedly gonna destroys all session variables. Then if try to access a
    private asp page it actually shows up despite me having :
    if not Session("login") = "true" then response.Redirect("login.asp") at the
    start of every private page.
    If I hit refresh on the private page I do get redirect but I dont see why it
    doesnt happen straight away.

    Another thing, kind of the same problem, when I add record to my access
    database then I goto the page that actually shows does record I sometime
    need to hit refresh for the new record to show up.

    Here is a code snip of inserting a record
    sSql = "Insert into News(.....) values(.....)
    set adoCon = server.CreateObject ("adodb.connection")
    adoCon.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &_
    Server.MapPath("database.mdb") & ";Persist Security Info=False"
    adoCon.execute sSql
    adoCon.close
    set adoCon = Nothing
     
    earl, Oct 28, 2003
    #1
    1. Advertising

  2. earl

    Ray at Guest

    "earl" <> wrote in message news:3f9ef5dc$...
    > If I logout of my websie I run the session.abandon command that is
    > supposedly gonna destroys all session variables. Then if try to access a
    > private asp page it actually shows up despite me having :
    > if not Session("login") = "true" then response.Redirect("login.asp") at

    the
    > start of every private page.
    > If I hit refresh on the private page I do get redirect but I dont see why

    it
    > doesnt happen straight away.


    Probably because of caching. See here for anti-caching code.
    http://www.aspfaq.com/show.asp?id=2022


    >
    > Another thing, kind of the same problem, when I add record to my access
    > database then I goto the page that actually shows does record I sometime
    > need to hit refresh for the new record to show up.


    Same reason.

    Ray at home
     
    Ray at, Oct 29, 2003
    #2
    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. brian lanning
    Replies:
    0
    Views:
    630
    brian lanning
    Jul 29, 2003
  2. Per Magnus L?vold
    Replies:
    1
    Views:
    5,211
    John C. Bollinger
    Oct 8, 2004
  3. =?Utf-8?B?Um9iSEs=?=
    Replies:
    4
    Views:
    5,426
    =?Utf-8?B?Um9iSEs=?=
    Apr 11, 2007
  4. Pkenty
    Replies:
    0
    Views:
    435
    Pkenty
    May 28, 2004
  5. Jazzis
    Replies:
    2
    Views:
    279
    Jazzis
    Sep 23, 2003
Loading...

Share This Page