1 Reply Latest reply: Oct 12, 2012 3:30 AM by 965397 RSS

    So what can I do to prevent webstart from caching my files?

    965397
      Hi
      I have installed java jre-7u7-windows-i586.exe on windows 7.

      and this pseudo code running within webstart:

      ---------------------------------------------------------------------------------------------------
      HttpURLConnection conn = (HttpURLConnection) resource.openConnection();
      File cached.......
      conn.setIfModifiedSince(cached.lastModified());
      conn.connect();
      int code = ((HttpURLConnection) conn).getResponseCode();
      ---------------------------------------------------------------------------------------
      Now my problem is that I always get 200 for the int code back.

      But it should be 304 (not modified)

      This happens because webstart is serving the file from ist cache as I can see in the following trace log entry

      network: Cache entry found [URL: https://server.com/wanted.jar, Version: null] prevalidated=false/0

      but this is not good for me....
      In the jsp serving the file I have a
      ((HttpServletResponse) response).setHeader("Cache-Control", "no-cache");

      So what can I do to prevent webstart from caching my files?

      Edited by: 962394 on 11.10.2012 10:11

      Edited by: 962394 on 11.10.2012 10:12