PHP page load seems to be requesting itself and misinterpreting the result
I'm working on a messy PHP page by another developer and I was analyzing the resource view in the Webkit d开发者_运维知识库eveloper tools and noticed that the page (index.php) makes an HTTP requests for itself and then interprets the results as an image despite it being sent with the text/html header. Because of this it throws the warning:
Resource interpreted as image but transferred with MIME type text/html.
Looking at the time graph the call comes after the <head>
because it has already requested images for the body. Sometimes there are even two 'bad' requests.
Can anyone explain what might be happening and/or suggest how to fix this? Could these be related to PHP includes?
Not sure how Webkit is making requests, but the only time I've seen this kind of behavior (a script calling itself as an image) is when:
- Image URLs are supposed to be generated and are not - leaving the image source as
''
or this current URL. - A
mod_rewrite
is too 'greedy', and redirects image requests - including the browser's favicon request - to the bootstrap (or similar) script.
Does Webkit request a favicon? That would be a later request in the timeline.
精彩评论