Bug 26572 - MIME type warning when some files read from cache
Summary: MIME type warning when some files read from cache
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 525.x (Safari 3.2)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-20 05:47 PDT by James Wheare
Modified: 2009-07-23 05:59 PDT (History)
2 users (show)

See Also:


Attachments
patch to detect Scripts correctly even when they're not currently cached (1.10 KB, text/plain)
2009-07-23 05:41 PDT, Erich Ocean
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Wheare 2009-06-20 05:47:22 PDT
Here are some headers:

==========

GET /static/playdar.js HTTP/1.1
Accept: */*
Cache-Control: no-cache
Pragma: no-cache

HTTP/1.1 200 OK
Date: Sat, 20 Jun 2009 12:31:40 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 PHP/5.2.8 mod_fastcgi/2.4.2
Last-Modified: Sat, 20 Jun 2009 12:14:32 GMT
Etag: "e0b6011-11ba0-46cc6955bfa00"
Accept-Ranges: bytes
Content-Length: 72608
Connection: close
Content-Type: application/javascript

==========

GET /static/playdar.js HTTP/1.1
Accept: */*
Cache-Control: max-age=0
If-Modified-Since: Sat, 20 Jun 2009 12:14:32 GMT
If-None-Match: "e0b6011-11ba0-46cc6955bfa00"

HTTP/1.1 304 Not Modified
Date: Sat, 20 Jun 2009 12:31:32 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 PHP/5.2.8 mod_fastcgi/2.4.2
Connection: close
Etag: "e0b6011-11ba0-46cc6955bfa00"

==========

With the first request, the MIME type is correctly identified as javascript, but with the second, the server returns 304 Not Modified and the browsers uses its cached file, but fails to interpret the MIME type of the file stored in cache. Web Inspector shows this warning:

(!) Resource interpreted as other but transferred with MIME type application/x-javascript.
Comment 1 Alexey Proskuryakov 2009-06-22 05:08:07 PDT
Could you provide steps to reproduce this issue with some live web site?

See also: bug 22084.
Comment 2 James Wheare 2009-06-22 05:14:06 PDT
http://www.playdar.org/

Empty cache. Then alt-shift-refresh. MIME type correctly detected.

Now just apple-r normal refresh. Notice the warning.
Comment 3 James Wheare 2009-06-22 05:15:21 PDT
Actually it seems to work sporadically each time you apple-r. But usually at least every other refresh will give you the error.
Comment 4 Erich Ocean 2009-07-23 05:41:11 PDT
Created attachment 33326 [details]
patch to detect Scripts correctly even when they're not currently cached
Comment 5 Erich Ocean 2009-07-23 05:42:16 PDT
It'd be great if someone could pick this up and push it through the process who's already set up to do so. I don't have the time to push through a two-line commit, given the amount of work my 5-minute (!) read of the committer guidelines seemed to indicate.
Comment 6 Erich Ocean 2009-07-23 05:59:13 PDT
This is also related to https://bugs.webkit.org/show_bug.cgi?id=22084