Hello, I found a similar thread in this forum but it didn’t contain any technical information so I decided to open a new one.
I have serverA.com which uses mod_rewrite on apache (behind varnish) to rewrite image links to serverB.com. Here’s the headers as seen when making the request from my own computer:
[code]http://serverA.com/uploads/BANNER.jpg
GET /uploads/serverA-BANNER.jpg HTTP/1.1
Host: serverA.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20130627 Firefox/22.0
Accept: image/png,image/;q=0.8,/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Referer: http://serverA.com/
Cookie: […]
Connection: keep-alive
Cache-Control: max-age=0
HTTP/1.1 302 Found
Server: Apache/2.2.16 (Debian)
Location: http://serverB.com/serverA.com/uploads/BANNER.jpg
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Type: text/html; charset=iso-8859-1
Content-Length: 300
Date: Sun, 30 Jun 2013 14:18:08 GMT
X-Varnish: 1974816656
Age: 0
Via: 1.1 varnish
Connection: keep-alive
GET /serverA.com/uploads/BANNER.jpg HTTP/1.1
Host: serverB.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20130627 Firefox/22.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Referer: http://serverA.com/
Cookie: […]
Connection: keep-alive
If-Modified-Since: Sun, 02 Jun 2013 20:10:26 GMT
If-None-Match: “9613-62c3-4de3170519080”
Cache-Control: max-age=0
HTTP/1.1 304 Not Modified
Date: Sun, 30 Jun 2013 14:18:09 GMT
Server: Apache/2.2.22 (Debian)
Connection: Keep-Alive
Keep-Alive: timeout=5, max=98
Etag: “9613-62c3-4de3170519080”
Cache-Control: max-age=604800, public[/code]
However, WebPagetest reports the following:
FAILED - (No max-age or expires) - http://serverA.com/uploads/BANNER.jpg