Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh automatically

Status
Not open for further replies.

desiana

Programmer
Oct 31, 2001
23
0
0
MY
I am doing a system using JSP currently, my problem is that to get the latest data from the database, I have to click the refresh button in the browser or else it will retrive the data from the cache memory (I think). Do you have any idea to solve this problem ?
 
The first lines in your asp page should be:
<% Response.CacheControl = &quot;no-cache&quot; %>
<% Response.AddHeader &quot;Pragma&quot;, &quot;no-cache&quot; %>
<% Response.Expires = -1 %>
There were other articles about this subject, another sure way to refresh is to make a hidden form value and fill this value with date and time, this causes the url allways to be unique.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top