Welcome Guest, Not a member yet? Register   Sign In
"Resource interpreted as stylesheet but transferred with MIME type text/html"
#1

[eluser]Kenneth Allen[/eluser]
I have a relatively simple page that refuses to use the specified CSS! I am developing on a Mac, and I have tested with Safari and Firefox and I get the same results. I finally chased the issue down to an entry in the Safari error console that I placed in the title for this entry.

The template file I am rendering looks like this:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
&lt;html&gt;
    &lt;head&gt;
        &lt;meta http-equiv="Content-type" content="text/html; charset=utf-8" /&gt;
        &lt;title&gt;&lt;?php echo $page_title; ?&gt;&lt;/title&gt;
        &lt;?php echo link_tag('Assets/SMaLL.css')."\n"; ?&gt;
    &lt;/head&gt;
    &lt;body&gt;
        <div>
            &lt;?php echo $content . "\n"; ?&gt;
        </div>
        <div>
            <p><br />Page rendered in {elapsed_time} seconds</p>
        </div>
    &lt;/body&gt;
&lt;/html&gt;

and the rendered page contains this:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
&lt;html&gt;
    &lt;head&gt;
        &lt;meta http-equiv="Content-type" content="text/html; charset=utf-8" /&gt;
        &lt;title&gt;SMaLL Administration&lt;/title&gt;
        &lt;link  href="http://d2.test/SMaLL/Assets/SMaLL.css" rel="stylesheet" type="text/css" /&gt;
    &lt;/head&gt;
    &lt;body&gt;
        <div>
            <h1>SMaLL Administration</h1>
        </div>
        <div>
            <p><br />Page rendered in 0.1011 seconds</p>
        </div>
    &lt;/body&gt;
&lt;/html&gt;

And the file ~/Sites/D2TestSite/SMaLL/Assets/SMaLL.css does exist.

I have tried several things but I cannot see an error that would be causing this. Does anyone know what I need to do to resolve this?


Messages In This Thread
"Resource interpreted as stylesheet but transferred with MIME type text/html" - by El Forum - 06-25-2009, 08:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB