i am designing a web-app in which i need to call servlet on a hyperlink. the problem is that whenever i click on the hyperlink for second or higher times it shows results of the the first click. i had put <http-equiv="Pragma" content="no-cache"> after the <html> tag but to no avail. please help me so that each time the link is clicked the servlet is called afresh.
neither is guaranteed to work, especially with proxy servers. The approach using init-params makes sure the application server itself doesn't cache anything, the approach using HTTP headers ASKS browsers and proxies not to cache (but not all will honour such requests).
Joined: Feb 16, 2001
i cud not understand the init param idea given above, i though it was a joke. can someone explain to me why would container read and interpret the init param. init-param element is solely for the use of the programmer.
yes, that will get MOST proxies to not cache, but there is no guarantee. I've once encountered a proxy that would cache anything we sent it no matter what we told it not to cache. In the end we got the network admins to set up an exlusion rule for our server (it was our own proxy ) so all requests to it would be ignored by the proxy.
Could have been a configuration error, but doesn't bode well.
I saw a thread on another site where someone got so desperate to stop caching that they appended incrementing parameters on the URL just so it would never match a previous request. That's gotta work, doesn't it?
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joined: Aug 03, 2002
Thats surely gonna work but don't u think its totally Illogical to have such solution.