Countdown banners are broken

Bug #642860 reported by Dylan McCall
72
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Ubuntu Website - OBSOLETE
Fix Released
High
Matthew Nuzum

Bug Description

The countdown banner does not work because a browser will cache its current state until Apache says it is modified (and sends a new one). This does not happen, because Apache doesn't say it is modified and does not send a new one.

Here are the headers sent with that image, according to Webkit's web inspector, on an average day looking at ubuntu.com:

Request URL:http://www.ubuntu.com/countdown/banner1.png
Request Method:GET
Status Code:304 Not Modified

Request Headers
Cache-Control:max-age=0
If-Modified-Since:Tue, 14 Sep 2010 15:45:07 GMT
Referer:http://www.ubuntu.com/
User-Agent:Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Ubuntu/10.04 Chromium/7.0.517.8 Chrome/7.0.517.8 Safari/534.7

Response Headers
Connection:keep-alive
Date:Sun, 19 Sep 2010 15:14:57 GMT
Server:Apache/2.2.8 (Ubuntu) mod_python/3.3.1 Python/2.5.2 PHP/5.2.4-2ubuntu5.10 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g
Via:1.0 privet.canonical.com:80 (squid/2.6.STABLE18)
X-Cache:MISS from privet.canonical.com
X-Cache-Lookup:HIT from privet.canonical.com:80

If I view the image do a complete refresh (equivalent to clearing my cache), I end up with the following:

Request URL:http://www.ubuntu.com/countdown/banner1.png
Request Method:GET
Status Code:200 OK

Request Headers
Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Cache-Control:max-age=0
Referer:http://www.ubuntu.com/countdown/banner1.png
User-Agent:Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Ubuntu/10.04 Chromium/7.0.517.8 Chrome/7.0.517.8 Safari/534.7

Response Headers
Accept-Ranges:bytes
Connection:keep-alive
Content-Length:9627
Content-Type:image/png
Date:Sun, 19 Sep 2010 15:17:18 GMT
Last-Modified:Tue, 14 Sep 2010 15:45:07 GMT
Server:Apache/2.2.8 (Ubuntu) mod_python/3.3.1 Python/2.5.2 PHP/5.2.4-2ubuntu5.10 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g
Via:1.0 jujube.canonical.com:80 (squid/2.6.STABLE18)
X-Cache:HIT from jujube.canonical.com
X-Cache-Lookup:HIT from jujube.canonical.com:80

Note the Last-Modified date. If the script that generates the image updates the last-modified date, this will work perfectly :)

Changed in ubuntu-website:
status: New → Confirmed
Changed in ubuntu-website:
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Matthew Nuzum (newz) wrote :

We have tried adding cache-control headers to our proxy but as you've pointed out here, it does not appear to be enough. I've submitted a patch to our cron job that manages the symlinks to update the modified time of the image so that when the browser does an if-modified-since check the time the symlink was created will be used instead of the time the linked file was actually modified.

Let's hope this works! (browser caching is a challenging topic)

Changed in ubuntu-website:
assignee: nobody → Matthew Nuzum (newz)
importance: High → Undecided
status: Triaged → Confirmed
Revision history for this message
André Desgualdo Pereira (desgua) wrote :

I'm afraid it not help or may be it's broken for another reason. Now the picture doesn't show up. I've attached a screenshot from my blog.

Revision history for this message
Antono Vasiljev (antono) wrote :

It doesnt work for me currently.
See screenshot of webinspector with response headers.

Response code is 404.

Changed in ubuntu-website:
importance: Undecided → High
summary: - Countdown banner does not work. Server tells client to use cached
- version
+ Countdown banners are broken
Revision history for this message
André Desgualdo Pereira (desgua) wrote :

It's working now.

Revision history for this message
Matthew Nuzum (newz) wrote :

This was fixed earlier this week by updating the file modification time.

Changed in ubuntu-website:
status: Confirmed → Fix Released
Revision history for this message
Dylan McCall (dylanmccall) wrote : Re: [Bug 642860] Re: Countdown banners are broken

> This was fixed earlier this week by updating the file modification time.

Great. Thank you!

Revision history for this message
satyadeep.1991 (satyadeep-1991) wrote :

Looks like the countdown banners are broken again!
Please upload them

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.