?
Solved

Go back and refresh

Posted on 2004-04-27
8
Medium Priority
?
650 Views
Last Modified: 2012-05-04
Hi,

I'm using Javascript with JSP and after running a query I am using the Go- back method in Javascript.

The problem is when the page goes back it needs to refresh so the update will take place.

Please help
0
Comment
Question by:Pigdogmonster
[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
  • 4
  • 3
8 Comments
 
LVL 2

Expert Comment

by:TheImmortal
ID: 10928958
Rather than use the history, you can get the page that called your query JSP from the Referrer header and redirect to it. This will cause the calling page to reload/refresh.  
0
 

Author Comment

by:Pigdogmonster
ID: 10929027
ok - how do i do that? :-)
0
 
LVL 2

Accepted Solution

by:
TheImmortal earned 80 total points
ID: 10929092
Your JSP would look something like this:

<%

refpage = request.getHeader("referrer");

/**
   * Query stuff
   */

response.redirect(refpage);

%>
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 

Author Comment

by:Pigdogmonster
ID: 10929477
I think I know what you are saying and I have tried doing it that way i.e. re-run the query but I canot get it to work!


I did get go back and refresh thing to work once,  I think I used something like

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1" />

on the page but for some reason this does not refresh the page,  all I what is for the page to refresh itself!  How hard can this be?
0
 
LVL 2

Expert Comment

by:Zeyadss
ID: 10981530
Maybe if you give me the code you are using at current, and I can probably solve the problem.
0
 

Author Comment

by:Pigdogmonster
ID: 10984449
well the problem seems only to be local to my machinen and works fine on my collegues?

0
 
LVL 2

Expert Comment

by:TheImmortal
ID: 10985477
Most likely your Cache settings are not set to check for new version of the page upon every visit. Look at your Tools - > Internet Options -> Temporary Internet File Settings (if you are using IE).
0
 
LVL 2

Expert Comment

by:TheImmortal
ID: 10985498
Most likely your Cache settings are not set to check for new version of the page upon every visit. Look at your Tools - > Internet Options -> Temporary Internet File Settings (if you are using IE).
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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

770 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