• Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • core
    • None
    • Platform: All, OS: All

      I browse a workspace (in my case on a build slave) and view some generated
      files. Then I re-build the project and try to look at the new generated files.

      Expected: new contents
      Experienced: old contents as seen when I first looked at it

          [JENKINS-272] workspace page delivers out-dated files

          gradopado created issue -

          gradopado added a comment -

          very easy to proove: create a new job just with a single shell command:

          date > date.txt

          In the worksapce view of this project, the date.txt file seems to be never updated.

          gradopado added a comment - very easy to proove: create a new job just with a single shell command: date > date.txt In the worksapce view of this project, the date.txt file seems to be never updated.

          gradopado added a comment -

          I thought it was caused by a clock difference between master and slaves, but is
          is not. Time is synchronized now.

          Found bug in 1.75, it still happens with 1.79.

          gradopado added a comment - I thought it was caused by a clock difference between master and slaves, but is is not. Time is synchronized now. Found bug in 1.75, it still happens with 1.79.

          I tried to reproduce the problem, but it works correctly for me.

          What browser are you using? Can you check the HTTP headers and tell me what it
          reports? For Firefox, this extension would let you see the header:
          http://livehttpheaders.mozdev.org/installation.html

          What I'm interested in is the headers like
          "If-Modified-Since: Thu, 08 Feb 2007 20:13:28 PST" that the browser is sending,
          and "Last-Modified: Thu, 08 Feb 2007 20:13:28 PST" that the server will send you.

          Kohsuke Kawaguchi added a comment - I tried to reproduce the problem, but it works correctly for me. What browser are you using? Can you check the HTTP headers and tell me what it reports? For Firefox, this extension would let you see the header: http://livehttpheaders.mozdev.org/installation.html What I'm interested in is the headers like "If-Modified-Since: Thu, 08 Feb 2007 20:13:28 PST" that the browser is sending, and "Last-Modified: Thu, 08 Feb 2007 20:13:28 PST" that the server will send you.
          Kohsuke Kawaguchi made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          gradopado added a comment -
          • cache cleaned, first access to the file:
            Last-Modified: Fri, 09 Feb 2007 10:19:33 CET
          • page reload:
            If-Modified-Since: Fri, 09 Feb 2007 10:19:33 CET

          HTTP/1.x 304 Not Modified

          • "build now" @ 09.02.2007 10:58:42
          • access file:
            (old contents, no headers sent!)
          • page reload:
            If-Modified-Since: Fri, 09 Feb 2007 10:19:33 CET

          Last-Modified: Fri, 09 Feb 2007 10:58:42 CET

          • "build now" @ 09.02.2007 11:00:23
          • access file:
            (old contents, no headers sent!)
          • page reload:
            If-Modified-Since: Fri, 09 Feb 2007 10:58:42 CET

          Last-Modified: Fri, 09 Feb 2007 11:00:23 CET

          • page reload:
            If-Modified-Since: Fri, 09 Feb 2007 11:00:23 CET

          HTTP/1.x 304 Not Modified

          ---------------------------
          Firefox just doesn't ask for a new file, at least I did not see any header. (I'm
          not an expert in HTTP.) A page reload seems to help. What do you think?

          gradopado added a comment - cache cleaned, first access to the file: Last-Modified: Fri, 09 Feb 2007 10:19:33 CET page reload: If-Modified-Since: Fri, 09 Feb 2007 10:19:33 CET HTTP/1.x 304 Not Modified "build now" @ 09.02.2007 10:58:42 access file: (old contents, no headers sent!) page reload: If-Modified-Since: Fri, 09 Feb 2007 10:19:33 CET Last-Modified: Fri, 09 Feb 2007 10:58:42 CET "build now" @ 09.02.2007 11:00:23 access file: (old contents, no headers sent!) page reload: If-Modified-Since: Fri, 09 Feb 2007 10:58:42 CET Last-Modified: Fri, 09 Feb 2007 11:00:23 CET page reload: If-Modified-Since: Fri, 09 Feb 2007 11:00:23 CET HTTP/1.x 304 Not Modified --------------------------- Firefox just doesn't ask for a new file, at least I did not see any header. (I'm not an expert in HTTP.) A page reload seems to help. What do you think?

          OK, so the issue seems to be that Firefox doesn't even send a request unless you
          hit F5.

          Maybe I need to send another cache control header or something.

          Kohsuke Kawaguchi added a comment - OK, so the issue seems to be that Firefox doesn't even send a request unless you hit F5. Maybe I need to send another cache control header or something.

          Apparently when Last-Modified header is set but no Expires header is set,
          Firefox automatically guesses the effective Expires header value and won't send
          GET with If-Modified-Since until that effective Expires date is reached.

          References:
          http://labs.cybozu.co.jp/blog/kazuho/archives/2006/02/utilizing_cache.php
          http://www.mnot.net/cache_docs/
          (still looking for authoritative source)

          The solution will be to send the Expires header with the same timestamp.

          Kohsuke Kawaguchi added a comment - Apparently when Last-Modified header is set but no Expires header is set, Firefox automatically guesses the effective Expires header value and won't send GET with If-Modified-Since until that effective Expires date is reached. References: http://labs.cybozu.co.jp/blog/kazuho/archives/2006/02/utilizing_cache.php http://www.mnot.net/cache_docs/ (still looking for authoritative source) The solution will be to send the Expires header with the same timestamp.

          Fixed in 1.83.

          Kohsuke Kawaguchi added a comment - Fixed in 1.83.
          Kohsuke Kawaguchi made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

            Unassigned Unassigned
            gradopado gradopado
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: