• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Refresh Problem.

 
Alex Marks
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,
I have the problem with refresh page. I have 2 JSP pages, a.jsp and b.jsp. In a.jsp, I display the information which is stored in the session. In b.jsp, I make some modifications to such information. When i come back a.jsp, the page still display the old information, but after press F5 or refresh button of the web's browser, it displays new information. I would like to ask if there is any way to over-come this problem.
Thank you for your help so much and have a nice day.
 
sudhir kamath
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Alex Marks:
Hi Everyone,
I have the problem with refresh page. I have 2 JSP pages, a.jsp and b.jsp. In a.jsp, I display the information which is stored in the session. In b.jsp, I make some modifications to such information. When i come back a.jsp, the page still display the old information, but after press F5 or refresh button of the web's browser, it displays new information. I would like to ask if there is any way to over-come this problem.
Thank you for your help so much and have a nice day.


a simple solution for this problem call page reload function in body onload,you can do this with simple javascript.
regards,
sundeep kamath
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65129
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forcing a reload in javascript would be a very untidy solution. Rather you need to control the caching of the page by the browser. Search this forum for topics on cache control.
 
Alex Marks
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your suggestion, i have found the solution.
 
Sripathi Krishnamurthy
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

Use this in the code so that cacheing does not occur.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sripathi Krishnamurthy:
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

Use this in the code so that cacheing does not occur.


This does not always work.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic