Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Browser cache

 
sreedhar Lackka
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Thanks a lot in advance.
We are developing one application in J2EE with Struts.
We are getting some different problem, some times data is not dispalying on the page.However after deleting browser cookies and offline content it started
displaying data.
Dont know what to do?
Please help me.

Regards,
Sree
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like there is a bug in the presentation code that displays the data on the page. You need to analyze this code and figure out why the data does not display on the page everytime.

Also, you should test presentation code with various web browsers, e.g. Safari, Navigator, Firefox, etc.
 
sreedhar Lackka
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reposnse.
I tested the same on Mozilla there is no problem at all.
do we need to do any browser specific program. Like no-cache.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Data not displaying on the page is the problem. The presentation code should not be dependent upon anything in a client HTML broswer. If there are any dependencies, then you should remove them. Content in a browser's cache is not "preventing data from displaying on the page."

It seems, the root cause of the probelm is not browser cache, it is the code. If a browser has cached data for a page, then it should display the cached data. Regardless of whether there is cached data or not, the presentation code should display data on the page everytime the page is requested from the server.

There are HTTP headers that can indicate how a browser should treat the page contents. You can set these in the HttpResponse object. However, this is treatment of "symptoms" of a problem, and not a solution of the possible code bug(s) (root problem). Also, there is no guaranteed behavior in the browser when including these headers. Each browser may handle them differently or ignore them all together.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic