When developing a new skin for cPanel, discovered a problem with the MIME type settings on the server-side.
Here is a description and solution for the problem I found:
http://devedge.netscape.com/viewsour...ct-mime-types/
My cPanel skin files all had an HTML 4.01 transitional doctype, which causes browsers like Mozilla 3 to ignore the CSS completely, and give this error message:
Warning: The stylesheet http://www.domain.net.nz:2082/fronte...trol/style.css was not loaded as CSS because its MIME type, "text/plain", is not "text/css".
So I loaded the default, iconic, and xskin themes, and found that they gave a similar, but less fatal error:
Warning: The stylesheet http://www.rise.net.nz:2082/frontend/default/style.css was loaded as CSS even though its MIME type, "text/plain", is not "text/css".
The difference being that my HTML files had an HTML 4.01 transitional doctype at the top. Once I removed the doctype, the error reported by Mozilla was reduced to the same warning received by all the default cPanel skins.
I know that the cPanel webserver is not a full one like apache, but can someone tell me if the cPanel equivalent to httpd.conf has incorrectly set the MIME type for CSS to text/plain, or has not set it at all?
Is it even possible to set the MIME type on cPaneld for CSS documents that are part of cPanel skins?
If someone can shed some light on this, it will be much appreciated.
Attached is a screenshot of the MIME warning for the default cPanel skin
G



LinkBack URL
About LinkBacks
Reply With Quote




