IIS ASP - Session Problem

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > June 2004 > Session Problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Session Problem
Kshitij

2004-06-28, 8:55 am

Hi,

I'm developing a website.The situation is I have logged in. I click on 'Log Out' button.On click I clear the session and redirect the page to login page.But when I click on the browser 'Back' button, It again goes to the previous page and displays the dat
a.It should not go to the page on click of browser 'Back' button once I have logged out by clearing the session.Any help on this will be helpful.

Thanks in advance.

Aaron [SQL Server MVP]

2004-06-28, 8:55 am

Don't let the page cache.
http://www.aspfaq.com/2022

--
http://www.aspfaq.com/
(Reverse address to reply.)




"Kshitij" <Kshitij@discussions.microsoft.com> wrote in message
news:C4536CF2-7BEA-48D6-9061-59D75218809C@microsoft.com...
> Hi,
>
> I'm developing a website.The situation is I have logged in. I click on

'Log Out' button.On click I clear the session and redirect the page to login
page.But when I click on the browser 'Back' button, It again goes to the
previous page and displays the data.It should not go to the page on click of
browser 'Back' button once I have logged out by clearing the session.Any
help on this will be helpful.
>
> Thanks in advance.
>



Bullschmidt

2004-06-28, 7:32 pm

A1ien51's disable the Back Button
http://www10.brinkster.com/A1ien51/.../BackButton.htm
What is going to happen, is when the page loads, it will send the surfer
to the last page in their history.
Now if a person tries to go back to it, then it will send them directly
back to the page they pushed the back button on!
Add this code to the header of your page:
<script>
history.forward();
</script>

JPS: Thus need to put the code on the page you don't want the user to be
able to go back to.
And here is my version of it:
<script type="text/javascript"> <!--
// Disable browser's Back button on another pg being able to go back to
this pg.
history.forward();
//-->
</script>

Best regards,
J. Paul Schmidt, Freelance ASP Web Designer
http://www.Bullschmidt.com
ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Aaron [SQL Server MVP]

2004-06-28, 7:32 pm

That's a great way to drive people AWAY from your site...

--
http://www.aspfaq.com/
(Reverse address to reply.)




"Bullschmidt" <paul@bullschmidt.com-nospam> wrote in message
news:OaWmS5WXEHA.2572@TK2MSFTNGP11.phx.gbl...
> A1ien51's disable the Back Button
> http://www10.brinkster.com/A1ien51/.../BackButton.htm
> What is going to happen, is when the page loads, it will send the surfer
> to the last page in their history.
> Now if a person tries to go back to it, then it will send them directly
> back to the page they pushed the back button on!
> Add this code to the header of your page:
> <script>
> history.forward();
> </script>
>
> JPS: Thus need to put the code on the page you don't want the user to be
> able to go back to.
> And here is my version of it:
> <script type="text/javascript"> <!--
> // Disable browser's Back button on another pg being able to go back to
> this pg.
> history.forward();
> //-->
> </script>



Evertjan.

2004-06-29, 3:16 am

Aaron [SQL Server MVP] wrote on 29 jun 2004 in
microsoft.public.inetserver.asp.general:
> "Bullschmidt" <paul@bullschmidt.com-nospam> wrote in message


[vbcol=seagreen]
> That's a great way to drive people AWAY from your site...


Tnx Aaron and Paul for this idea,
I will ad this to my favored scripts for this purpose.

However,
"driving people AWAY from your site" is off topic on this NG,
unless it is done by serverside means,
so I propose to use:

response.redirect "http://cnn.com/"

instead, as CNN also pushes history forward.

;-)

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Alan Silver

2004-06-29, 9:56 am

In article <OcLRz6WXEHA.3892@TK2MSFTNGP09.phx.gbl>, "Aaron [SQL Server
MVP]" <ten.xoc@dnartreb.noraa> writes
>That's a great way to drive people AWAY from your site...


You should add a section to the ASP FAQ with other great ways to drive
people away. It would make for some light reading and possibly (yeah I
know, I'm an optimist) even help convince people not to bother with
these stupid failures.

I vote for the "Javascript disabling of the right-click menu" as my fave
stupid trick. Irritates me no end.

Oh and the "floating Javascript window that sails across your browser"
as a close second.

ta ra

--
Alan Silver
(anything added below this line is nothing to do with me)
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com