开发者

CSS and Javascript not working! Browser cannot read css and javascript files

I'm using a CMS called 'Nukeviet' and I installed it on my localhost. I'm facing a very strange problem, I've tried to search for the solution but nothing found.

I can see that css files are not wor开发者_高级运维king at all. When I use Firebug to find the problem, I switch to the tab 'CSS' and... all the required css files are there but it says... there're no rules! When I use the Developer tools of Google Chrome, in Resources tab, Chrome can see all the css files, but the contents of them are abnormal, like in this image:

CSS and Javascript not working! Browser cannot read css and javascript files

.

I checked the encoding but it's normally ANSI. And, of course, the contents in all the css files are normal ANSI, no international text.

I tried copying the css files to a new place and write a new HTML for testing, those CSS works perfectly as usual without any problem.

So I can't understand why there're "ugly" question marks like that. Something... encrypted it?

Javascript files get the exact same problem, but image files are ok, all the others are ok, just problem with CSS and Javascript.


I think your javascript and css files are compressed for example with gzip-compression ...

Please check the configuration of your webserver if the gzip-comression is enabled. If you're using Apache this can also be done in the .htaccess-files instead of the server-configuration - but I think that's stuff you know - don't you?

For further information: http://developer.yahoo.com/performance/rules.html#gzip At this page you can also check if some header-informations are missing in the response you get from your server if you request the css-file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜