Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Change MIME type of CSS from text/php to text/css (SOLVED, Safari bug)
Hi there.
I’m troubleshooting an existing 4.2.0 install and stumbling across some CSS MIME type problems.
I’m using modular CSS and it’s served up (successfully) like this:
<txp:css format=“link” n=“resets” />
<txp:css format=“link” n=“global” />
<txp:css format=“link” n=“images” />
<txp:css format=“link” n=“boxes” />
<txp:css format=“link” n=“text” />
<txp:css format=“link” n=“article” />
<txp:css format=“link” n=“comment” />
<txp:css format=“link” n=“hacks” />
<txp:css format=“link” n=”<txp:section />” />
I do, however, get a warning in Safari web inspector:
Resource interpreted as stylesheet but transferred with MIME type text/php.
With that in mind, is there any way I can force or trick css.php
to deliver its payload as text/css
rather than text/php
?
Thank you in advance.
Pete
Last edited by gaekwad (2010-09-19 17:06:51)
Offline
Re: Change MIME type of CSS from text/php to text/css (SOLVED, Safari bug)
Do all the sheets issue that warning, or just this one:
<txp:css format="link" n="<txp:section />" />
? If so, does it make a difference if you use single quotes around the section tag? As far as I can recall, css.php
is delivered with a text/css
MIME type though I reserve the right to be wrong.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Change MIME type of CSS from text/php to text/css (SOLVED, Safari bug)
Hey Stef, thanks for your quick response – each line gives the warning, so I get 9 consecutive warnings in the web inspector.
Offline
Re: Change MIME type of CSS from text/php to text/css (SOLVED, Safari bug)
The Safari web inspector appears to be mistaken, because those style sheets are served with a Content-Type: text/css
header.
Offline
Re: Change MIME type of CSS from text/php to text/css (SOLVED, Safari bug)
Hi ruud – thanks for your reply. I’ve just tried looking at the same page with Mac/Firefox with Firebug (which reports text/css
) and you’re right – the bug appears to be with Safari.
Offline
Re: Change MIME type of CSS from text/php to text/css (SOLVED, Safari bug)
FWIW, I’ve submitted a bug report to Apple regarding the apparent Safari bug. I’m not hopeful that I’ll get anything back in return, but I’ve done my bit for now.
Offline