refresh and session

E

earl

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
 
R

Ray at

earl said:
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
 

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

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top