开发者

CSS sometimes isn't loaded [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.开发者_如何学JAVA Closed 11 years ago.

Sometimes CSS isn't loaded on my site. I can't say exactly when, it just happens sometimes and I can't determine the cause.

I am loading fonts from Fontdeck, maybe that's the issue - the site can't load the fonts and that's why CSS won't work?

EDIT:

Where the error occured in loading my css.file there is message: 301 Moved Permanently


I had this issue in IE9, and it turned out it is because IE9 sends the Get request with "text/css" while other browsers send it as "text/css,*/*" so the server IIS was failing to satisfy the request and returning 406 (Not Acceptable).

Download a tool like Fiddler and check the traffic between your server and the browser and see what is causing it. Also if this is happening in IE, try going to Developer tools (F12) and change the compatibility mode and see if that makes it render correctly.


Where the error occured in loading my css.file there is message: 301 Moved Permanently

This is an issue with your server, not your CSS or HTML. The URL for your CSS file is no good if it's being redirected elsewhere. Simply remove the 301 server redirect command or put your CSS file at a valid URL that's not being redirected.

Test the validity of the URL of the CSS file by simply calling it up in a browser. If it's in a good location, you'll see your CSS file's contents load into the window.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜