How to Prevent Caching in Browser


  1. DroidDweeb

    DroidDweeb New Member

    We have a web application geared towards mobile phones. It was originally targeted for the iPhone safari browser, but we would like to advertise that it is Android compatible as well.

    The webkit browser displays the pages well, but we're having trouble with the browser displaying out of date information from the cache. We're adding the usual response headers...

    Code (Text):
    1. response.setHeader("Cache-Control","no-cache");
    2. response.setHeader("Pragma","no-cache");
    3. response.setDateHeader ("Expires", -1);
    ...but the user has to refresh the screen for the app to make a request for updated information.

    Is there something specific that the Android browser looks for when deciding to pull a cached or fresh copy of a page?

    Thanks

    Advertisement

Share This Page