Can we avoid caching from IE History (Urgent!!!)


Web tier: servlets, JSP, Web frameworks: Can we avoid caching from IE History (Urgent!!!)

  1. Dear All,
    In my application I have used caching code and
    it avoids caching successfully , But I am facing the
    problem with IE history.
    The pages (specifically) accessed using query string , any pdf report accessed in application can be seen in IE history with complete URL.
    Is there anyway to avoid this.
    Any help would be higly appriciable.

    Thanks & Regards,
    Dushyant Bhardwaj
  2. Try setting the response header with stuff like this:

    // never cache the response
    response.setHeader( "Cache-Control", "no-cache" );

  3. Dear Mike ,
    Thanks for your reply but I m already doing that.
    My problem is I am generating PDF files in my application
    and all the generted pdfs get cached as well as can be
    seen in IE history.
    If one user logs into the application and generates some pdf reports
    another user can always view the transaction of first.
    So my point is Can we avoid caching of pdf,.rtf .. files .
    Also the JSP pages used with query string or
    can be seen in IE history.

    Early response is appriciable.

    Dushyant Bhardwaj