jbarker.com / blog

Icon

“Resource interpreted as Font but transferred with MIME type …”

Have you seen a warning like this in your web browser console?

Resource interpreted as Font but transferred with MIME type ...

Google Chrome web browser

Some browsers, like Google Chrome, will show this warning when a font is downloaded from a web server that sets an unexpected MIME type for fonts.

For many font types, there is a solution!

Read the rest of this entry »

Web Fonts: No MIME Types, No Problem

In a previous post, Correct MIME Type for CSS Web Fonts, I discussed the lack of official, standards-based MIME types for various web fonts.

In the 18 months since then, the state of MIME types for web fonts largely remains the same:

Because there are no defined MIME types for TrueType, OpenType, and WOFF fonts, the MIME type of the file specified is not considered.
@font-face, Mozilla Developer Network

Web Browser Logos

Read the rest of this entry »

Correct MIME Type for CSS Web Fonts

Support for CSS3 Fonts via @font-face is now available in Microsoft Internet Explorer, Mozilla Firefox, and Apple Safari, with support in Opera and Google Chrome due soon.

Web Browser Logos

With increasing support, more sites are being designed with web fonts. However, many web servers are not providing the correct MIME type for these files.

For the Apache web server, the following configuration in an .htaccess file will provide the correct MIME type for web fonts:

AddType application/vnd.ms-fontobject .eot
AddType application/octet-stream .otf .ttf

Read the rest of this entry »