Google hosted jQuery and webfonts causing webkit warnings
Asked Answered
F

1

14

I've got the following code in my headers to load a font from Google's hosted APIs, and to load jQuery and jQueryUI.

<link href='http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>

This is causing the following warnings on Webkit browsers (I'm copying from Chrome):

Resource interpreted as a stylesheet but transferred MIME mime type application/javascript. jquery-ui.min.js:-1
Resource interpreted as Font but transferred with MIME type font/woff. font:-1
Resource interpreted as Font but transferred with MIME type font/woff. font:-1

Does anyone know what to make of these problems? Why would the jQuery line be loading without issues, while the jQuery-ui line is causing this problem?

I can't tell on first inspection if these are causing any problems, and jQuery-ui sounds like it's working, but the fact that it's interpreting jQuery-ui as a stylesheet certainly sounds really bad.

Frightened answered 21/4, 2011 at 0:16 Comment(2)
I am having the same issue my self.Wall
only thing I can suggest is to download the font and jquery files and upload them to your public_html folder somewhere.Stairwell
B
7

This problem is a result of the Google APIs and not you. You can host the files yourself to get rid of the problem?

Bratwurst answered 1/6, 2011 at 18:2 Comment(2)
So this is a bug in Google APIs and everyone that uses them sees these errors? For all the reasons that Google APIs are a good idea (caching, speed, etc.) I'm planning on sticking with the Google hosted APIs, it'd just be nice to fix the warnings.Frightened
If you look at the error messages they indicate that the transfered MIME type is incorrect or the web browser is interpreting them incorrectly. Either way you have no control over this.Bratwurst

© 2022 - 2024 — McMap. All rights reserved.