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

AJAX : How do I clear Browser cache in JSP ?

 
vijay saraf
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I am using Ajax in my web application.
but just because of browsers cache i am getting problem.
I am using Internet Explorer.
If any one having an idea regarding this please tell me.
[ January 13, 2007: Message edited by: vijay saraf ]
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vijay saraf:
Hello All,

I am using Ajax in my web application.
but just because of browsers cache i am getting problem.
I am using Internet Explorer.
If any one having an idea regarding this please tell me.

[ January 13, 2007: Message edited by: vijay saraf ]


Are you getting the same old data for each request? Because browser cache response and returns that only again and agian.

If yes then make your request different each time by sending one more extra parameter called 'time'.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you probably should switch to post

or

xmlhttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");

Eric
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic