Error getting half-glyphons-regular.woff2 on successful AJAX call from jQuery

I get an error stating that jQuery could not find the path to the half-glyphons-regular.woff2. An error occurs when a function is run to successfully request an AJAX. In this function, I inserted a hyperlink that uses the glyphicon from Twitter Bootstrap.

Looking at the path, I am sure that this is the right path, so I do not know why he gave me an error. How can I fix this error?

Screenshots of the error

+44
jquery twitter-bootstrap-3
Mar 25 '15 at 14:19
source share
3 answers

Using IIS, I fixed it inside the Web.config file by adding the following inside <system.webServer> :

 <staticContent> <remove fileExtension=".woff" /> <remove fileExtension=".woff2" /> <mimeMap fileExtension=".woff" mimeType="application/font-woff" /> <mimeMap fileExtension=".woff2" mimeType="application/font-woff" /> </staticContent> 

Note that first I delete the extensions, if they already exist.

+74
Jun 29 '15 at 11:19
source share

To make it work with IIS Express, you need to add the mime type. In a text editor, open the file in the Documents folder in %UserProfile%\Documents\IISExpress\config\applicationhost.config

Find the line that looks like this:

 <mimeMap fileExtension=".woff" mimeType="font/x-woff" /> 

I would recommend changing it, since the official MIME type has changed, but despite the fact that he just copied this line and added a new one, and change the Extension file to .woff2 in the new one. Here is my modified file (with fixed MIME types)

 <mimeMap fileExtension=".woff" mimeType="application/font-woff" /> <mimeMap fileExtension=".woff2" mimeType="application/font-woff" /> 
+53
Apr 07 '15 at 22:13
source share

If you prefer to work in the IIS GUI or are unsure of the command line or configuration files, follow these steps.

To fix the error while getting half-glyphons-regular.woff2 in IIS, you just need to add the MIME type for woff2 .

  • Open IIS and select your server
  • In the function view, select MIME Types
  • Click Add ... in the Actions panel (upper right corner)
  • Enter the .woff2 filename extension
  • Enter the MIME type application / font-woff

Also, as palehorse noted, make sure the MIME type for .woff and .woff2 application / font-woff

Sources:

+4
Sep 11 '15 at 15:36
source share



All Articles