benlilaj / gears

Automatically exported from code.google.com/p/gears
0 stars 1 forks source link

gears_init.js has odd cache behavior #1019

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a webpage that includes 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" 
type="text/javascript"></script>
<script src="https://code.google.com/apis/gears/gears_init.js" 
type="text/javascript"></script>
in <head>
2. Load firebug into firefox 3.6.6, select Net (timing)
3. Refresh the page

Expect: 
  304 (not modified) reply for both files

Get: 
  200 (OK) for gears_init.js

This is not desirable.

Details:

Courtesy of firebug, here are the details. 

Request to https://code.google.com/apis/gears/gears_init.js: 
------------ 
Host    code.google.com 
User-Agent      Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.6) 
Gecko/20100625 Firefox/3.6.6 
Accept  */* 
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      115 
Connection      keep-alive 
Referer                 (...) 
Cookie                      (........) 
If-Modified-Since       Fri, 29 May 2009 20:42:35 GMT 
If-None-Match   "0497acf9a7e93c42e96b2ef64d5c18b2" 
Cache-Control   max-age=0 

Response: 
--------------- 
HTTP/1.1 200 OK 
Vary: Accept-Language,Cookie,Referer 
Content-Type: text/javascript; charset=UTF-8 
Etag: "0497acf9a7e93c42e96b2ef64d5c18b2" 
Last-Modified: Fri, 29 May 2009 20:42:35 GMT 
Date: Tue, 06 Jul 2010 14:04:56 GMT 
Expires: Tue, 06 Jul 2010 15:04:56 GMT 
Cache-Control: public, max-age=3600 
X-Content-Type-Options: nosniff 
Content-Encoding: gzip 
Server: codesite_static_content 
Content-Length: 1749 
X-XSS-Protection: 1; mode=block 

Request to https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js 
------------ 
Host    ajax.googleapis.com 
User-Agent      Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.6) 
Gecko/20100625 Firefox/3.6.6 
Accept  */* 
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      115 
Connection      keep-alive 
Referer (...) 
If-Modified-Since       Tue, 09 Feb 2010 23:05:02 GMT 
Cache-Control   max-age=0 

Response: 
--------------- 
HTTP/1.1 304 Not Modified 
X-Content-Type-Options: nosniff 
Date: Tue, 06 Jul 2010 14:04:56 GMT 
Server: sffe 
X-XSS-Protection: 1; mode=block 

Original issue reported on code.google.com by timothe....@gmail.com on 7 Jul 2010 at 12:28