header(“Content-type: text/css”); is working in Firefox and Chrome, but in Internet Explorer 9 it shows up as ‘text/html’

IE has “No, I’m not kidding about Content-Type” switch:

X-Content-Type-Options: nosniff

BTW: make sure you also send Last-Modified and disable session.cache_limiter in PHP, otherwise browsers will keep reloading the CSS file, which will negatively impact performance.

Leave a Comment