Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue loading external files (CSS and JavaScript) in Safari

I'm having a bizarre situation here where my external site files, both JavaScript and CSS, are being interpretted as somehow corrupt on Safari browsers. The same site looks fine in Internet Explorer, but on Safari the javascript and css are being completely ignored. If I look at the files through the Inspector, I can see that Safari views these files as containing junk characters -- either asian symbols or square boxes. When I navigate directly to the files, however, they appear just fine. See the site below, viewed in Safari 5, for an example:

http://amsoell.com/dch/castlemoore

If I embed the same exact CSS or JavaScript into the HTML itself, it renders perfectly. I don't know if this is a server issue or something in my CSS, but I'm at my wits end here.

like image 732
Andy Soell Avatar asked Jun 28 '10 16:06

Andy Soell


1 Answers

I checked your website for validation and it's not valid. But the most interesting thing is that your enconding is utf-16le. You should put your encoding to utf-8. Just put the following line in your <head> section:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
like image 109
Bogdan Constantinescu Avatar answered Sep 22 '22 10:09

Bogdan Constantinescu