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.
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?
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.
Created attachment 24968 [details] screen capture of inspector on incorrect behavior
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.
I think the warning on the console may be a bug in Inspector which does not know how to handle 304 replies.
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.
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.
A quick test with today's nightly seems to show this bug as fixed.
Looks like this one is back. I got it on r43887 and r44201. javacript file blank in inspector and warning in console
Is it the same issue that was fixed, or a different one? Do you have precise steps to reproduce it?
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.
I'm unable to reproduce the issue with the tip-of-tree WebKit r82822.