JIRA
  1. JIRA
  2. JRA-17395

Some gif images are not being sent with browser caching headers

    Details

    • Type: Bug Bug
    • Status: Resolved (View Workflow)
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.13.2
    • Fix Version/s: 4.2
    • Labels:
      None
    • Environment:

      Description

      Sampling of gif images that are not being sent with HTTP headers which will notify browsers to cache them.
      /jira/images/icons/print.gif
      /jira/images/icons/help_blue.gif
      /jira/images/icons/bug.gif
      /jira/images/icons/priority_blocker.gif
      /jira/images/icons/task.gif
      /jira/images/icons/priority_major.gif
      /jira/images/icons/priority_minor.gif
      /jira/images/icons/issue_subtask.gif
      /jira/images/icons/link_out_bot.gif
      /jira/images/icons/newfeature.gif

      T 10.1.12.123:3466 -> 10.0.1.25:8180 [AP]
      GET /jira/images/icons/print.gif HTTP/1.1.
      Host: serenity.lindenlab.com:8180.
      User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10.
      Accept: image/png,image/*;q=0.8,*/*;q=0.5.
      Accept-Language: en-us,en;q=0.5.
      Accept-Encoding: gzip,deflate.
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7.
      Keep-Alive: 300.
      Connection: keep-alive.
      Referer: http://serenity.lindenlab.com:8180/jira/secure/Dashboard.jspa.
      Cookie: [removed]
      .
      
      
      T 10.0.1.25:8180 -> 10.1.12.123:3466 [AP]
      HTTP/1.1 200 OK.
      Server: Apache-Coyote/1.1.
      ETag: W/"375-1235019814000".
      Last-Modified: Thu, 19 Feb 2009 05:03:34 GMT.
      Content-Type: image/gif;charset=UTF-8.
      Content-Length: 375.
      Date: Fri, 22 May 2009 14:12:48 GMT.
      .
      GIF89a.....0.......jjj.........{.....:W.i.....<X....w.......................................................................x..y...........;>@..C...TTT...""".@p...........................
      ..................!.....0.,...........@...*...$Q.l......"l..W.*.p.`....P
      ..X)u....Z..H5..I..B00.../*.../...../......!M..#............."..&.(+.....%..../).../...1../,.../..10./.M/.C1...0A.;
      
      T 10.1.12.123:3468 -> 10.0.1.25:8180 [AP]
      GET /jira/images/icons/help_blue.gif HTTP/1.1.
      Host: serenity.lindenlab.com:8180.
      User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10.
      Accept: image/png,image/*;q=0.8,*/*;q=0.5.
      Accept-Language: en-us,en;q=0.5.
      Accept-Encoding: gzip,deflate.
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7.
      Keep-Alive: 300.
      Connection: keep-alive.
      Referer: http://serenity.lindenlab.com:8180/jira/secure/Dashboard.jspa.
      Cookie: [removed]
      .
      
      
      T 10.0.1.25:8180 -> 10.1.12.123:3468 [AP]
      HTTP/1.1 200 OK.
      Server: Apache-Coyote/1.1.
      ETag: W/"621-1235019814000".
      Last-Modified: Thu, 19 Feb 2009 05:03:34 GMT.
      Content-Type: image/gif;charset=UTF-8.
      Content-Length: 621.
      Date: Fri, 22 May 2009 14:12:48 GMT.
      .
      GIF89a.....e.,%
      ..\21.+#...31/...g.(...c0..1/...s..S..:..;20..*./+.21...{..Z..R..\..F..L..]0,.20...Z..D..q,$.-'...A20...:..M21...w0,...q..H.*...`..#.p ..-..o..~..b0....F..>..r32...flY(..)..1..zzuH.y&..S.
      ....L..b..a..h..,..N..v..F..H.....4..5..... ..+..W.l.gN... .m...V..1..^+"......;..N.....x..]..i..B..L..B..I..X33..@p.......................................................................
      .......!.....e.,............e..d....ed<4.)).4<d.6.5&....&5.6..#/;.%..%.;/#.e..7.0."++".0.7...:.(...[.
      
      .(.:.2....F\T..`....2.9>.1^Z''GC1.>9..=.$.cVAB]O.$.=..@`qa.."*T.A2........."..'_B4iq ...S.4...
      .....P.....).}...C.D.....(......;
      
      T 10.1.12.123:3461 -> 10.0.1.25:8180 [AP]
      GET /jira/images/icons/bug.gif HTTP/1.1.
      Host: serenity.lindenlab.com:8180.
      User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10.
      Accept: image/png,image/*;q=0.8,*/*;q=0.5.
      Accept-Language: en-us,en;q=0.5.
      Accept-Encoding: gzip,deflate.
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7.
      Keep-Alive: 300.
      Connection: keep-alive.
      Referer: http://serenity.lindenlab.com:8180/jira/secure/Dashboard.jspa.
      Cookie: [removed]
      .
      
      
      T 10.0.1.25:8180 -> 10.1.12.123:3461 [AP]
      HTTP/1.1 200 OK.
      Server: Apache-Coyote/1.1.
      ETag: W/"348-1235019814000".
      Last-Modified: Thu, 19 Feb 2009 05:03:34 GMT.
      Content-Type: image/gif;charset=UTF-8.
      Content-Length: 348.
      Date: Fri, 22 May 2009 14:12:48 GMT.
      .
      GIF89a........................................333..........::.kk................MM...................TT.............XX.....................................................................
      ..................!.......,..........y@A`H,..Hd..l6.....\h.Bju.Uj...!:eR$.L.. 7)....f.....!. .
      w..{....
      .w..........w.......w.!r...n..u.....d.....db.... dF.C.A.;
      
      T 10.1.12.123:3463 -> 10.0.1.25:8180 [AP]
      GET /jira/images/icons/priority_blocker.gif HTTP/1.1.
      Host: serenity.lindenlab.com:8180.
      User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10.
      Accept: image/png,image/*;q=0.8,*/*;q=0.5.
      Accept-Language: en-us,en;q=0.5.
      Accept-Encoding: gzip,deflate.
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7.
      Keep-Alive: 300.
      Connection: keep-alive.
      Referer: http://serenity.lindenlab.com:8180/jira/secure/Dashboard.jspa.
      Cookie:[removed]
      .
      
      
      T 10.0.1.25:8180 -> 10.1.12.123:3463 [AP]
      HTTP/1.1 200 OK.
      Server: Apache-Coyote/1.1.
      ETag: W/"221-1235019814000".
      Last-Modified: Thu, 19 Feb 2009 05:03:34 GMT.
      Content-Type: image/gif;charset=UTF-8.
      Content-Length: 221.
      Date: Fri, 22 May 2009 14:12:48 GMT.
      .
      GIF89a...........##....{{.DD....ee.OO.99..........22.pp.......ZZ.............................................!.......,..........Z.$.di.hj....I4.k..Cc....:..'..P.!....b3...h.d..a..4.:.7.hb
      .[*......G..F..%@....{j}.y)(+.&!.;
      
      T 10.1.12.123:3464 -> 10.0.1.25:8180 [AP]
      GET /jira/images/icons/task.gif HTTP/1.1.
      Host: serenity.lindenlab.com:8180.
      User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10.
      Accept: image/png,image/*;q=0.8,*/*;q=0.5.
      Accept-Language: en-us,en;q=0.5.
      Accept-Encoding: gzip,deflate.
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7.
      Keep-Alive: 300.
      Connection: keep-alive.
      Referer: http://serenity.lindenlab.com:8180/jira/secure/Dashboard.jspa.
      Cookie: [removed]
      .
      
      
      T 10.0.1.25:8180 -> 10.1.12.123:3464 [AP]
      HTTP/1.1 200 OK.
      Server: Apache-Coyote/1.1.
      ETag: W/"231-1235019814000".
      Last-Modified: Thu, 19 Feb 2009 05:03:34 GMT.
      Content-Type: image/gif;charset=UTF-8.
      Content-Length: 231.
      Date: Fri, 22 May 2009 14:12:48 GMT.
      .
      GIF89a.......................................................333...fff.......................................!.......,..........d.C.dI=(JMl.Bg....."]C....D!6........D.P....8)O....:#..d..f
      ..I@`Fk..3T| 0.H$.A....
      ku..DBS.p{..D&.#.!.;
      

        Issue Links

          Activity

          Hide
          Anton Mazkovoi [Atlassian] added a comment -

          Note, the images from within the webapp are served by an App Server, in our case Tomcat most of the time.

          Note, that from what I know, as there is a last modified date given, the browsers should still try to cache these images. This depends on the browser.

          So, we need to look at how do we get Tomcat to server images with better caching headers. Should look around for available info. Surely there are some best practices for this and we are not the first ones to try and do this.

          Show
          Anton Mazkovoi [Atlassian] added a comment - Note, the images from within the webapp are served by an App Server, in our case Tomcat most of the time. Note, that from what I know, as there is a last modified date given, the browsers should still try to cache these images. This depends on the browser. So, we need to look at how do we get Tomcat to server images with better caching headers. Should look around for available info. Surely there are some best practices for this and we are not the first ones to try and do this.
          Hide
          Brad Baker [Atlassian] added a comment -

          Can you please outline what App Server you are running on. Are you running JIRA stand alone or your own app server instance?

          Show
          Brad Baker [Atlassian] added a comment - Can you please outline what App Server you are running on. Are you running JIRA stand alone or your own app server instance?
          Hide
          Spider Linden added a comment -

          Firefox 3.x is used the most in our environment. I added a bunch of environment details in the environment section, but what you probably need is outlined below.

          Typical access is against Apache HTTPd using SSL on port 443, then mod_proxy to 8180 non-SSL on localhost. The http logs above are against the Tomcat 5.5.20 non-SSL port 8180, in an attempt to be less confusing, but I failed.

          With the http headers in the log above, if the browser is going against the non-SSL 8180 port, then it does cache the images. However, I have Tomcat also listening on port 8443 with SSL, and they do not get cached. I believe they need the Cache-Control: max-age=315360000000 and Cache-Control: public added to them in order to instruct the browser to cache them over SSL. I know you guys are already familiar with this from JRA-17373 and JRA-17374.

          The summary should probably be changed to "Some gif images are not being sent with Cache-Control headers that will allow them to be browser cached over SSL" or something to that effect.
          Anton and Brad, as an aside, I really appreciate the attention you've been giving my jira. thanks guys!

          Show
          Spider Linden added a comment - Firefox 3.x is used the most in our environment. I added a bunch of environment details in the environment section, but what you probably need is outlined below. Typical access is against Apache HTTPd using SSL on port 443, then mod_proxy to 8180 non-SSL on localhost. The http logs above are against the Tomcat 5.5.20 non-SSL port 8180, in an attempt to be less confusing, but I failed. With the http headers in the log above, if the browser is going against the non-SSL 8180 port, then it does cache the images. However, I have Tomcat also listening on port 8443 with SSL, and they do not get cached. I believe they need the Cache-Control: max-age=315360000000 and Cache-Control: public added to them in order to instruct the browser to cache them over SSL. I know you guys are already familiar with this from JRA-17373 and JRA-17374 . The summary should probably be changed to "Some gif images are not being sent with Cache-Control headers that will allow them to be browser cached over SSL" or something to that effect. Anton and Brad, as an aside, I really appreciate the attention you've been giving my jira. thanks guys!
          Hide
          Brad Baker [Atlassian] added a comment -

          The new 4.0 web resource manager adds cache-control:public to the downloaded images and js under its control

          However we need to check what happens in Tomcat Standalone for "WAR" images (not served by the resource manager) but by the app server.

          I am leaving this issue around to ensure it gets examined before 4.0 ships.

          Show
          Brad Baker [Atlassian] added a comment - The new 4.0 web resource manager adds cache-control:public to the downloaded images and js under its control However we need to check what happens in Tomcat Standalone for "WAR" images (not served by the resource manager) but by the app server. I am leaving this issue around to ensure it gets examined before 4.0 ships.
          Hide
          Justus Pendleton [Atlassian] added a comment -

          It appears that if you leave it up to tomcat then you get pretty basic headers. If you want anything better than that you need to write a filter. It sounds like we may need Yet Another Filter for these images. Either that or put them under web resource manager control, if that is possible.

          It also looks like the newer connectors in Tomcat 6 serve static content dramatically better than mod_jk does: http://www.devshed.com/c/a/BrainDump/Tomcat-Benchmark-Procedure/1/

          Show
          Justus Pendleton [Atlassian] added a comment - It appears that if you leave it up to tomcat then you get pretty basic headers. If you want anything better than that you need to write a filter. It sounds like we may need Yet Another Filter for these images. Either that or put them under web resource manager control, if that is possible. It also looks like the newer connectors in Tomcat 6 serve static content dramatically better than mod_jk does: http://www.devshed.com/c/a/BrainDump/Tomcat-Benchmark-Procedure/1/
          Hide
          Brad Baker [Atlassian] added a comment -

          We probably dont need another filter but perhaps a new rule in the rewrite filter xml to capture these paths and some new invocation code to generate ETags for example

          Show
          Brad Baker [Atlassian] added a comment - We probably dont need another filter but perhaps a new rule in the rewrite filter xml to capture these paths and some new invocation code to generate ETags for example
          Hide
          G B added a comment -

          We are seeing this with:

          /images/icons/undo_16.gif
          /images/borders/spacer.gif
          /images/icons/link_in_only.gif
          /images/icons/emoticons/sad.gif
          /images/icons/emoticons/smile.gif

          and others. Is this the same bug? Is there a workaround for this? This is likely a JIRA 4.0 blocker for us as it means trying to view a single issue takes 2 minutes instead of <10 seconds for users with high-latency connections on pages with lots of icons.

          Show
          G B added a comment - We are seeing this with: /images/icons/undo_16.gif /images/borders/spacer.gif /images/icons/link_in_only.gif /images/icons/emoticons/sad.gif /images/icons/emoticons/smile.gif and others. Is this the same bug? Is there a workaround for this? This is likely a JIRA 4.0 blocker for us as it means trying to view a single issue takes 2 minutes instead of <10 seconds for users with high-latency connections on pages with lots of icons.
          Hide
          Brad Baker [Atlassian] added a comment -

          @Matt

          We could do this very easily via a bug fix release.

          Show
          Brad Baker [Atlassian] added a comment - @Matt We could do this very easily via a bug fix release.
          Hide
          Brad Baker [Atlassian] added a comment -

          This was fixed in JIRA 4.2 but this issue was not closed off at the time.

          Show
          Brad Baker [Atlassian] added a comment - This was fixed in JIRA 4.2 but this issue was not closed off at the time.

            People

            • Assignee:
              Matt Quail [Atlassian]
              Reporter:
              Spider Linden
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h