I was observing my HTTP headers for css files and noticed both stylesheets
<link type="text/css" rel="stylesheet" href="css/stuff1.css">
<link rel="stylesheet" href="css/stuff2.css">
had the following Content-Type: text/css in their HTTP headers. Is it the server that is guessing the Content-Type?
Also – what is the purpose of declaring the mime type in the <link> tag if the server is going to determine what the mime type is anyways?
I’m running ubuntu 12.04 and apache2
I don’t think so the
typeattribute is required for a<link>tag. The HTML 4.01/HTML 5 specs state it to be an “advisory” hint as to the content type of the content available at the link target address.The HTML 5 spec says –
If the attribute is omitted, but the external resource link type has a default type defined, then the user agent must assume that the resource is of that type.