Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

setting No Cache for JSP  RSS feed

 
Harini Mamidi
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using the following statements so that the Browser does not cache the JSP pages.

response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");

In one perticular page I am using <object> tag and including a link to the PDF file with in this tag.

The contents for this PDF file are not being refreshed on each visit. In short the PDF file is stored in temporary internet files.

Any advice would be appreciated on how to prevent the browser from storing the PDF file.

Thanks,
Harini
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65832
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Caching control on a page will have no effect upon pages or other resources linked to from that page.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
they're also not guaranteed to work even on the page they're set on. Many proxies silently ignore such directives and will cache them anyway.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!