My personal experiences with Java, Android and Linux.

Undertow

We recently spent a whole day trying to fix an Internet Explorer related bug. If you got the same problem you can find our solution here.

Our phenomenon

We included a special font with the css property @font-face. That worked quite well for all browsers. Until we used SSL for HTTP encryption. IE could not load the fonts anymore. By examining the HTTPS traffic with Fiddler we finally found out that the HTTP header “pragma=no-cache” did the difference. So if you want to user @font-face and deliver your site with HTTPS you must never ever set the HTTP header “pragma=no-cache”. As soon as we got rid of this HTTP header, IE behaved the way it did before.

Edit 2014-10-04:

There are others who report that the headers “Vary” or “Cache-Control=no-cache” confused IE.

How we fixed the problem

In our case we use following stack:

Wildfly 8.1 as application server

Undertow 1.1 as web server

BASIC authentication

Unfortunately Undertow 1.1 introduced the feature to disable caching for secured resources (commit). Since then all resources are delivered with pragma=no-cache which are secured with BASIC authentication. So since we updated to Undertow 1.1 IE did not work properly anymore. The only way to fix it was not to secure the fonts. We could not find any way to overrule the new default behaviour of Undertow 1.1.

Still upset about IE

We are still upset about the behaviour of the Internet Explorer! Why on earth do they always manage to screw things up like that? If you watch the communication between IE and your server you see following:

IE requests the font from the server.

As soon as the server starts delivering the resource, IE closes the connection. Probably because it suddenly detects that it should get the resource from cache.

This behaviour apparently destroys the cache content. So IE can’t access the font.

IE tries to retrieve the next declared font but with the same wrong pattern.