• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 669
  • Last Modified:

Go back and refresh

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
Pigdogmonster
Asked:
Pigdogmonster
  • 4
  • 3
1 Solution
 
TheImmortalCommented:
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
 
PigdogmonsterAuthor Commented:
ok - how do i do that? :-)
0
 
TheImmortalCommented:
Your JSP would look something like this:

<%

refpage = request.getHeader("referrer");

/**
   * Query stuff
   */

response.redirect(refpage);

%>
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.

 
PigdogmonsterAuthor Commented:
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
 
ZeyadssCommented:
Maybe if you give me the code you are using at current, and I can probably solve the problem.
0
 
PigdogmonsterAuthor Commented:
well the problem seems only to be local to my machinen and works fine on my collegues?

0
 
TheImmortalCommented:
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
 
TheImmortalCommented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now