Bug 956075 - Define meaningful Expires for static css|ico files
Summary: Define meaningful Expires for static css|ico files
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-webadmin
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.4.0
Assignee: Alexander Wels
QA Contact: Jiri Belka
URL:
Whiteboard: ux
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-24 09:21 UTC by Jiri Belka
Modified: 2014-03-31 12:26 UTC (History)
9 users (show)

Fixed In Version: ovirt-3.4.0-alpha1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-31 12:26:06 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 20119 0 None None None Never

Description Jiri Belka 2013-04-24 09:21:29 UTC
Description of problem:
Static css files have Etag so browser correctly asks server if the file was changed but 'Expires' is missing. Thus it makes false "alerts" in YSlow shown as 'Grade E on Add Expires headers' (even in fact there's caching thanks to Etag). Not sure how favicon.ico is handled.

YSlow:
======

Grade E on Add Expires headers

There are 4 static components without a far-future expiration date.

    (no expires) https://10.34.63.76/webadmin/webadmin/gwt/standard/standard.css
    (no expires) https://10.34.63.76/webadmin/webadmin/WebAdmin.css
    (no expires) https://10.34.63.76/webadmin/webadmin/webadmin.nocache.js
    (no expires) https://10.34.63.76/favicon.ico


HTTP Headers (Firebug):
=======================

URL;Status;Domain;Size;Remote IP;Timeline
GET standard.css;304 Not Modified;10.34.63.76;3.8 KB;10.34.63.76:443;3ms

> Response Headers

Cache-Control	no-cache
Connection	close
Date	Wed, 24 Apr 2013 08:41:05 GMT
Etag	W/"26953-1303843922000"
Expires	Thu, 01 Jan 1970 01:00:00 CET
Vary	Accept-Encoding

> Request Headers

Accept	text/css,*/*;q=0.1
Accept-Encoding	gzip, deflate
Accept-Language	en-US,en;q=0.5
Authorization	Basic YWRtaW5AaW50ZXJuYWw6MTIzNDU2
Cache-Control	max-age=0
Connection	keep-alive
Cookie	JSESSIONID=wwLMfdC20kzqOeRwY5eF2L5B
Host	10.34.63.76
If-Modified-Since	Tue, 26 Apr 2011 18:52:02 GMT
If-None-Match	W/"26953-1303843922000"
Referer	https://10.34.63.76/webadmin/webadmin/WebAdmin.html
User-Agent	Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Firefox/17.0

Version-Release number of selected component (if applicable):
sf13.1

How reproducible:
100%

Steps to Reproduce:
1. Check 'Add Expire Headers' in YSlow
2. Compare HTTP headers for each file in Firebug menus
3.
  
Actual results:
Etag is present, Expires is 'Thu, 01 Jan 1970 01:00:00 CET'

Expected results:
There should be some meaningful Expires, like for webadmin.nocache.js which has both Etag and Expires.

Additional info:
- This is to make reports in YSlow happy (showing *A* for Add Expire Headers) and not to check if there was really caching used via Etag
- see discussion in https://bugzilla.redhat.com/show_bug.cgi?id=889898#c8

Comment 1 Einav Cohen 2013-09-21 17:53:06 UTC
Alex - wasn't this one already taken care of?

Comment 2 Alexander Wels 2013-09-23 12:55:15 UTC
As far as I know we put expiration on everything. And as of Greg's favicon patch, the favicon doesn't exist in /favicon.ico anymore. Can we double check if Yslow is still reporting an E?

Comment 3 Einav Cohen 2013-10-01 23:54:26 UTC
(In reply to Alexander Wels from comment #2)
> As far as I know we put expiration on everything. And as of Greg's favicon
> patch, the favicon doesn't exist in /favicon.ico anymore. Can we double
> check if Yslow is still reporting an E?

Jiri?

Comment 4 Jiri Belka 2013-10-11 10:55:16 UTC
Sorry for delay but YSlow has stopped working on FF available on RHEL6. So FF 24.0 from Windows.


Grade C on Add Expires headers

There are 2 static components without a far-future expiration date.

    (2013/10/10) https://jb-rh33.rhev.lab.eng.brq.redhat.com/webadmin/webadmin/webadmin.nocache.js
    (no expires) https://jb-rh33.rhev.lab.eng.brq.redhat.com/webadmin/theme-resource/favicon

- for webadmin.nocache.js

I see now recent Expires.

HTTP/1.1 304 Not Modified
Date: Fri, 11 Oct 2013 10:46:30 GMT
Connection: close
Etag: W/"8824-1381246086000"
Expires: Thu, 10 Oct 2013 10:46:30 GMT
Cache-Control: no-cache
Vary: Accept-Encoding
Set-Cookie: locale=en_US; Expires=Wed, 29-Oct-2081 14:00:37 GMT; Path=/

- for favicon

# type | size (KB) | url | expires | response time (ms) | etag
favicon	| 0.3K | https://jb-rh33.rhev.lab.eng.brq.redhat.com/webadmin/theme-resource/favicon | no expires | 85 | W/"318-1379968531000"

Comment 5 Alexander Wels 2013-10-11 12:05:47 UTC
This is a good example of why you shouldn't blindly follow whatever yslow says. webadmin.nocache.js should not be cached (hence the nocache) in the name. And thus it doesn't have an expires far in the future. On the other hand the favicon should have an expires which I will fix shortly.

Comment 6 Einav Cohen 2013-10-15 13:19:44 UTC
[clearing needinfo on me; please re-set it with a question if needed]

Comment 7 Sandro Bonazzola 2014-01-13 13:56:19 UTC
oVirt 3.4.0 alpha has been released including the fix for this issue.

Comment 8 Jiri Belka 2014-03-11 12:22:02 UTC
ok, av2.1 rhevm-webadmin-portal-3.4.0-0.3.master.el6ev.noarch

favicon expires 2015/3/11 and webadmin.nocache.js has short expire per reason.

Comment 9 Sandro Bonazzola 2014-03-31 12:26:06 UTC
this is an automated message: moving to Closed CURRENT RELEASE since oVirt 3.4.0 has been released


Note You need to log in before you can comment on or make changes to this bug.