Never permit direct URL access to any given page in your
application....that's all.
Always track the window.history.length characteristic in a cookie.
Write to the cookie using an "onunload=" event handler and store the
window.history.length.
If another browser window opens or is already opened, chances are very great
that it has a different history.length than the first browser window.
Put this logic in the "onload=" event handler.
Alert the user of the problem, and then do a window.close() to shut-down the
second browser window;
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Rahul
> Sent: Sunday, February 18, 2001 2:04 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to disable Back on Browser?
>
>
> Hello
>
> Probably I am replying to a centuries old mail.
>
> But the problem is that , the solutin below is great. But it only works
> when we open the page firsttime from the desktop by double clicking the
> icon. not when we open the page in a existing browser window
>
> Does anyone has any suggestions??
>
> -rahul
>
>
> On Tue, 2 Jan 2001, Bhushan Bhangale wrote:
>
> > Hi
> >
> > This is my first mail to this forum. Only two days before I
> subscribed to this mailing list. Here is a tricky solution to
> your problem.
> >
> > <script language=JavaScript>
> > window.history.forward(1);
> > </script>
> >
> > This will disable the browser menu back button as well as the
> back menuitem of the popup.
> >
> > Try doing it.....
> >
> > cheers
> >
> > Thanks & Regards
> > Bhushan Bhangale
> > http://www.bbhangale.com
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets