This week's book giveaway is in the Open Source forum.
We're giving away four copies of Programmers Guide to Apache Thrift and have Randy Abernethy on-line!
See this thread for details.
Win a copy of Programmers Guide to Apache Thrift this week in the Open Source forum!
    Bookmark Topic Watch Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis
  • Mark post as helpful
  • send pies
  • Report post to moderator
While the browsers usually have a mind of their own, the following hints added to the response header seem to prevent most modern browsers from pulling pages out of cache when the same URL is "hit".



The same effect can be achieved by using meta tags in the HTML header:



The Cache-Control header was added in HTTP 1.1, while the other two were also present in HTTP 1.0.

Note that it's easy to avoid having to put this onto each and every page (or servlet) by creating a servlet filter that adds the appropriate headers to the response for each request to a non-static resource.




Back to:

ServletsFaq

JspFaq
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!