[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Reloading JSP on back button click

Posted on 2004-10-19
7
Medium Priority
?
863 Views
Last Modified: 2008-03-06
Hi,

I am using JSP/javascript in my application.
When a user navigates from one page to another and clicks on the back button I want to reload the previous page via a server call instead of loading it from browser cache.
I am currently using POST method for form submission.

Any idea how I can acheive this?
0
Comment
Question by:srnambiar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 36

Assisted Solution

by:Zyloch
Zyloch earned 75 total points
ID: 12355350
Hi srnambiar,

You can try setting no-cache headers.
http://www.jguru.com/faq/view.jsp?EID=377&page=2 has the details.

Regards,
Zyloch
0
 

Author Comment

by:srnambiar
ID: 12355902
If I set the no-cache headers I get a warning message saying that the page has expired.
I do not want this message to appear. Instead I want the previous page to reload.
0
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 12356104
No Choice, if you don't want to set cache header, you may need to POST to your previous page from your cancel button.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 53

Expert Comment

by:Ryan Chong
ID: 12356110
or a javascript like: onclick="window.location.href = 'mypreviouspage.jsp'; " at cancel button maybe be useful too... ?
0
 
LVL 8

Accepted Solution

by:
sigmacon earned 225 total points
ID: 12366289
If a page was downloaded by a browser client as response to a form submission and that page needs to be reloaded, usually because of the no-cache headers set as pointed out by Zyloch, THAN IT IS UP TO THE BROWSER WHETHER A MESSAGE IS SHOWN TO RELOAD THE PAGE. Some have user settings to control that. But that's browser specific. One first suggestion I have is to replace the form method POST with GET. That surely would work. If that's not possible, please respond.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12384674
Yes, sigmacon is right. The Page Expired is caused by using POST. If you don't have sensitive info and not too much of it, use GET.

By the way, I read somewhere that the no-cache headers will only work in IE if the document is less than 64kb? Must be a bug in IE..
0
 
LVL 53

Assisted Solution

by:Ryan Chong
Ryan Chong earned 75 total points
ID: 12388165
I got problem regarding jsp file cannot exceed 64kb before, my solution is to 'chop' the jsp file into many pieces, then make them as include files, and my problem resolved 8-)

so, srnambiar. Which way you prefer to go? ;-)
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question