Issues with Cache-Control

Discussion in 'Apache' started by greg0ir, Feb 9, 2010.

  1. #1
    I'm trying to resolve a problem with IE - When I press the back button in my browser to view a results listing page (created from a POST) I get the "Webpage has expired" message.

    In my java code, I've added
    response.setHeader("Cache-Control", "max-age=20, must-revalidate");

    When I access the site on localhost:8080 (directly to tomcat), it behaves correctly. I can go back and forth between the results listing and a particular result, and after 20 secs, then it expires. (Without the must-revalidate, it never expires at all).

    When I access the same page using apache with proxypass/proxypassreverse, then it completely ignores my cache-control directive, and if I press "back", it is immedietely expired.

    I have used tools to verify that the headers are in fact coming through in both scenarios..

    Does anybody have any suggestions?

    I don't know if this is an Apache problem/setting, but Apache is the only different factor in the equation..

    thanks!
     
    greg0ir, Feb 9, 2010 IP
  2. wgcom

    wgcom Peon

    Messages:
    157
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    do redirect to results page after processing post data?
    like :
    <%
    request.get ....
    //Handle request
    ......

    response.sendRedirect("results.jsp?resultid=xxx");
    %>

    This way user will never be asked to repost the data....

    Why you using POST to get specific result from listing?
     
    wgcom, Feb 9, 2010 IP