CSS sometimes isn't loaded [closed]
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.
精彩评论