Bug 22084 - REGRESSION: 304 Not modified responses confuse Inspector
Summary: REGRESSION: 304 Not modified responses confuse Inspector
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P1 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-05 09:57 PST by Max Barel
Modified: 2011-04-04 09:06 PDT (History)
7 users (show)

See Also:


Attachments
screen capture of inspector on incorrect behavior (178.46 KB, image/png)
2008-11-07 03:30 PST, Max Barel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Barel 2008-11-05 09:57:48 PST
I found two other related bugs in there: 20959 and 21207.
Since changeset 36109, when a page is loaded, there are some times where a cached file, generates a warning in the inspector console :
Resource interpreted as other but transferred with MIME type xxx
xxx can be javascript or css at least, maybe other types.
This is always when the new protocol is used as we can see the request headers If-Modified-Since and If-None-Match. The server response is correct.
The real problem comes because the concerned file is not correctly interpreted and for javascript can produce unexpected result. It does not look as if the file is really not interpreted, but rather as if some condition/event are not raised like window.load etc.

 I can't find a way to reproduce the first incorrect caching handshake (timeout or what) but as soon as it occurs it its reproductible on each page load unless a full reload is made where state is reset to correct behavior.
Comment 1 Antti Koivisto 2008-11-06 11:47:24 PST
Is this is still happening after r37753 (https://bugs.webkit.org/show_bug.cgi?id=21763)? That fixed a major problem with  If-none-match/If-modified-since.

In failing case is the server responding with 304 or something else?
Comment 2 Max Barel 2008-11-06 14:56:12 PST
I tested the bug again yesterday, before posting this, with latest nightly (38068) but right now I'm not able to get it back.
Could it be related to the cached files, since I emptied the cache in between.
I'll try again and post here.
Comment 3 Max Barel 2008-11-07 03:30:32 PST
Created attachment 24968 [details]
screen capture of inspector on incorrect behavior
Comment 4 Max Barel 2008-11-07 03:30:50 PST
I confirmed roday the problem is still there in build 38068. See the attached screen capture.
Notice that I did NOT confrm that there is still bad javascript behavior. Th patch may have corrected this. Nevertheless, there are still warnings in console and as before, the file content is displayed blank in inspector. I could set up a test case on window load event but I'm not sure exactly id its pertinent.
Comment 5 Antti Koivisto 2008-11-07 11:08:34 PST
I think the warning on the console may be a bug in Inspector which does not know how to handle 304 replies.
Comment 6 Antti Koivisto 2008-11-07 11:23:04 PST
Yep. Resources revalidated with If-modified-since/If-none-match show up as blank in inspector. They also produce errors in the error console.

I'll change the titile of the bug to cover this.
Comment 7 Alexey Proskuryakov 2009-05-12 07:32:18 PDT
Does this still happen after <http://trac.webkit.org/projects/webkit/changeset/42896>? This fixed a case of revalidated resources appearing missing in Web Inspector.
Comment 8 Max Barel 2009-05-13 04:19:25 PDT
A quick test with today's nightly seems to show this bug as fixed.
Comment 9 Max Barel 2009-05-28 14:36:47 PDT
Looks like this one is back. I got it on r43887 and r44201.
javacript file blank in inspector and warning in console
Comment 10 Alexey Proskuryakov 2009-05-29 07:33:16 PDT
Is it the same issue that was fixed, or a different one? Do you have precise steps to reproduce it?
Comment 11 Max Barel 2009-05-29 08:43:27 PDT
The difficult point is that it may be related to apache version or such. I get it when using local apache (bundled with 10.5, Apache/2.2.9). Not when I use MAMP bundled (Apache/2.0.59), on same system and files.
I have to make development switching to use one or other.
To get the point you should have a html file refering another resource file, say javascript. On 304, the inspector does not display js file and a warning is issued in console.
Closing the inspector, and reopening it does show the js file content, until next reload.
Comment 12 Alexander Pavlov (apavlov) 2011-04-04 04:52:17 PDT
I'm unable to reproduce the issue with the tip-of-tree WebKit r82822.