1. Download our Official Android App: Forums for Android!

Apps How to Prevent Caching in Browser

Discussion in 'Android Development' started by DroidDweeb, Mar 31, 2010.

  1. DroidDweeb

    DroidDweeb Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Mar 31, 2010

    Mar 31, 2010
    1
    0
    5
    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

Loading...