• Post Reply Bookmark Topic Watch Topic
  • New 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

setting No Cache for JSP

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Caching control on a page will have no effect upon pages or other resources linked to from that page.
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic