1

IIS refuses to serve bootstrap's glypicons, but happily serves font-awesome icons... what gives?

I have the following in web.config:

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

I've tried x-woff as well as x-font-woff as described here

But it still serves as text/html.. and yet serves font-awesome .woff correctly

enter image description here

Community
  • 1
  • 1
parliament
  • 21,544
  • 38
  • 148
  • 238
  • The difference between the two is your requesting the glyphicons file from Javascript - initiator is jQuery ajax. From this, I gotta assume that Accept in the request header isn't set to application/x-woff. – Frison Alexander Jul 15 '14 at 20:33
  • good observation. What can I try to solve? I'm using angular although I do have jQuery loaded. – parliament Jul 19 '14 at 00:38

1 Answers1

0

try

$.ajax( url: '/path/to/font/file.woff', 
         headers: { Accept: 'application/x-woff', 
                    "Content-Type": 'application/x-woff' }, 
         method: 'GET')
Mathias Müller
  • 22,203
  • 13
  • 58
  • 75
Frison Alexander
  • 3,228
  • 2
  • 29
  • 32