Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-09-19 16:00:17

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,482
Bitbucket GitHub

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

#2 2010-09-19 16:26:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,942
Website GitHub

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

#3 2010-09-19 16:41:20

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,482
Bitbucket GitHub

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

#4 2010-09-19 16:48:23

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#5 2010-09-19 17:06:10

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,482
Bitbucket GitHub

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

#6 2010-09-20 12:53:25

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,482
Bitbucket GitHub

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

Board footer

Powered by FluxBB