Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Browser Back and Forward

  Asked By: Steven    Date: Feb 25    Category: Java    Views: 1365
  

Assume below scenario:You know if you
have logged on Yahoo! mail and when you are reading a
mail:1 - if you press browser back button and come back
to login page 2- Then press browser Forward
button, you will be gone to Login page insetead of the
mail page.In other words, in client side you have
forwarded to other page.I want to have this
functionality in the login page of my application.but I don't
know how?I have a loggin.jsp page

Share: 

 

5 Answers Found

 
Answer #1    Answered By: Heru Chalthoum     Answered On: Feb 25

We haven't ignored your question... I'm just
researching how to do this... The servlet API has access to a
history method... I'm just trying to see how to do this
and test it out.<br><br>We've been using a
"breadcrumb" mediator in our development which is kept in
session and keeps track of where the person has been. You
get the URI and push it on a stack in the mediator...
But there should be another way to do
it.

 
Answer #2    Answered By: Murad Bashara     Answered On: Feb 25

I am not sure you will find the answer in the
Servlet API, Stephen. I believe that this will require
some client-side JavaScript work. I could be mistaken
though.I suggest to the author of the original post that
you do some research into JavaScript and see if you
can find an answer to your question there.One
other thought: will the forward  button always pull the
next page from the cache? What if you force the page
to not be stored in the cache using HTTP headers,
thus forcing a request to be sent for the
page?

 
Answer #3    Answered By: Juan Reynolds     Answered On: Feb 25

I may not be understanding the question but I
can't seem to reproduce the scenario. If I log in to
Yahoo mail and from the mail main page, click the back
button to the login page and then the forward  button,
I'm at the mail home page again.<br><br>FWIW I have
my browser  set to refresh every visit to the page.
What am I missing? I know that JavaScript has the
history object that has back() and forward() methods so
maybe there's something useful there.

 
Answer #4    Answered By: Rafael Thompson     Answered On: Feb 25

I was confusing some stuff I had seen in JavaScript.

 
Answer #5    Answered By: Angie Bennett     Answered On: Feb 25

You can try catch in JavaScript function which is
called by onUnload (<BODY
onUnload="unloaded()"><br>)"full login field and empty passw field" event and
forward to another page, if this is true.

 
Didn't find what you were looking for? Find more on Browser Back and Forward Or get search suggestion and latest updates.




Tagged: