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
PigdogmonsterAsked:
Who is Participating?
 
TheImmortalConnect With a Mentor Commented:
Your JSP would look something like this:

<%

refpage = request.getHeader("referrer");

/**
   * Query stuff
   */

response.redirect(refpage);

%>
0
 
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.