Re: Parsing .css files with php: Cons? [message #176743 is a reply to message #176737] |
Sat, 21 January 2012 01:50 |
Chuck Anderson
Messages: 63 Registered: September 2010
Karma:
|
Member |
|
|
Michael Fesser wrote:
> .oO(Captain Paralytic)
>
>
>> On Jan 20, 10:25 am, Michael Fesser <neti...@gmx.de> wrote:
>>
>>> No. You have to explicitly send the correct header or some browsers
>>> might ignore the CSS. For example
>>>
>>> header('Content-Type: text/css; charset=UTF-8')
>>>
>> Oh OK. Any ideas which ones?
>>
>
> In the past Gecko browsers (i.e. Firefox) were a bit picky about the
> correct CSS content type. If the file wasn't delivered as text/css, it
> was ignored.
>
> Micha
I have successfully used:
header("Content-type: text/css");
After implementing a php based style sheet a couple of different times
it seemed wasteful, and a bit of a kludge. If the style sheet is
ultimately static, it is wasteful to keep generating one every time it
is used. Now I use a php script to generate the style sheet file for me.
If I want to make changes I edit the php based file (or any included
definition files, e.g., colors.php) and run it.
--
*****************************
Chuck Anderson • Boulder, CO
http://cycletourist.com
Turn Off, Tune Out, Drop In
*****************************
|
|
|