Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A webpage is being hosted by apache2, CentOS 6.2.

It Gets HTML, CSS, JS files ok to the client side. But CSS and JS don't render, What can be hapenning? Since they should run 100% on client side...

share|improve this question
up vote 10 down vote accepted

The mime types are probably wrong.

Check they're serving the content with Content-type: text/javascript or Content-type: text/css. You can check this using the Network tab of Chrome's Inspector or Firebug.

You'll need mod_mime, and ensure you have these lines in your httpd.conf:

AddType text/css .css
AddType text/javascript .js

That should do it.

share|improve this answer
Yes, you are right! most of them are 'Content-type: text/plain' Any tip on how to change them? – jacktrades Jul 5 '12 at 22:42
Please see my edits. You can also put those lines in a .htaccess if you really have to, but will still need mod_mime. – Jay Jul 5 '12 at 22:51
It was enabled, added those lines. You are a Genius! – jacktrades Jul 5 '12 at 22:57
Nah, just someone who's had exactly the same problem in the past ;-) But thanks! – Jay Jul 5 '12 at 23:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.