issue parsing woff files

With the wonderful addition of the Web Font Kit and the ability to take almost any custom font and apply it to a web site also brings a new performance issue. Most will never notice the issue. Those sites with heavy traffic will. It comes in the form of a load delay. A noticeable pause just before the browser loads the object using the font kit. Here is why.

Most font kits include a woff file type of the font. This font is unknown by default to IIS (among other web servers). When IIS tries to load the request for the .woff file, it hangs for a moment while it tries to determine what to do, ultimately just erroring out.

The simple fix: add a mime type to IIS (I like to apply to the default service so it is applied to all shared sites) for .woff. In IIS 6, you will find this setting under HTTP Headers. In IIS 7, it will be under Mime Types when you select a site. In both cases you will add a new mime type with “.woff” as the extension and “application/x-font-woff” as the MIME type. Save and you should be good to go without restarting IIS.