Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome interpreting jpg resource as Document

Consider the following image at: http://znood.com/images/801/130x130.jpg

I have a controller rendering this image and transferring it with image/jpeg MIME.

Chrome is throwing the warning:

Resource interpreted as Document but transferred with MIME type image/jpeg.

Why would an image be interpreted as a document and why would Chrome throw such a warning?

like image 629
Abdo Avatar asked Oct 10 '22 22:10

Abdo


1 Answers

add the proper doctype to your pages, something like

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

and then start your HTML with

<html xmlns="http://www.w3.org/1999/xhtml">

Regards,

M.

like image 62
BigMike Avatar answered Oct 13 '22 12:10

BigMike