header("Content-type: text/css"); works in Firefox, Chrome and other but not in IE9. Not sure whats up.
In Chrome and Firework its shows the style sheet if i open it in its own tab and its being applied to the page.
In Chrome under Network in the developer tools it says the type is text/css and the status is 200.
In IE9, it wants to download the style sheet if i open it in its own tab and its not being applied to the page.
The F12 developer tools you can click on network, start capturing and refresh the page it shows the Style.css.php type is text/html and result is 406.
<link rel="stylesheet" type="text/css" href="/assets/css/style.css.php" media="screen" /> is in the head
Request Headers:
Key Value
Request GET /assets/css/main.css HTTP/1.1
Accept text/css
Referer http://10.0.1.5/
Accept-Language en-US
User-Agent Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Accept-Encoding gzip, deflate
Host 10.0.1.5
Connection Keep-Alive
Cookie PHPSESSID=*Hidden*
Response headers:
Key Value
Response HTTP/1.1 406 Not Acceptable
Date Fri, 01 Apr 2011 10:12:42 GMT
Server Apache/2.2.14 (Ubuntu)
Alternates {"main.css.php" 1 {type application/x-httpd-php}}
Vary negotiate
TCN list
Keep-Alive timeout=15, max=100
Connection Keep-Alive
Content-Type text/html; charset=iso-8859-1
Originally asked by: Keverw on Stack Overflow


Answers