Bug 26572 - MIME type warning when some files read from cache
: MIME type warning when some files read from cache
Status: UNCONFIRMED
: WebKit
WebCore Misc.
: 525.x (Safari 3.2)
: Macintosh Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-06-20 05:47 PST by
Modified: 2009-07-23 05:59 PST (History)


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


Note

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


Description From 2009-06-20 05:47:22 PST
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 From 2009-06-22 05:08:07 PST -------
Could you provide steps to reproduce this issue with some live web site?

See also: bug 22084.
------- Comment #2 From 2009-06-22 05:14:06 PST -------
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 From 2009-06-22 05:15:21 PST -------
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 From 2009-07-23 05:41:11 PST -------
Created an attachment (id=33326) [details]
patch to detect Scripts correctly even when they're not currently cached
------- Comment #5 From 2009-07-23 05:42:16 PST -------
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 From 2009-07-23 05:59:13 PST -------
This is also related to https://bugs.webkit.org/show_bug.cgi?id=22084