Firefox "Save File" dialog for .otf font file on 1 server and not on another
I have 2 Linux servers, both Red Hat Enterprise 4.
If I visit a page with links to .otf (Opentype Font) files on a Linux server (prod) and I click on one of them, Firefox renders the font. If I visit the same page on a different Linux server (dev), I get a "Save File" prompt in Firefox. In Internet Explorer, I get the File Save prompt from either server. It's probably a package that the prod server has that the dev server doesn't? I'm not sure where to start looking or what to look for. I do want the Save prompt. Please advise. |
Got something to do with MIME types perhaps. Try comparing the HTTP headers from the two servers. You can use wget:
Code:
$wget -S --spider http://devserver/font.otf Btw, what version of Firefox are you using and which web server? |
Using FF 3.6
Apache From server that prompts user to download the OTF file: HTTP request sent, awaiting response... HTTP/1.1 200 OK Date: Wed, 26 May 2010 13:07:30 GMT Server: XXX Last-Modified: Mon, 24 May 2010 19:40:18 GMT ETag: "336095c-6be0-35e84c80" Accept-Ranges: bytes Content-Length: 27616 Vary: Accept-Encoding Connection: close Content-Type: text/plain X-Pad: avoid browser bug Length: 27,616 (27K) [text/plain] From server that renders the OTF file: HTTP request sent, awaiting response... HTTP/1.1 200 OK Date: Wed, 26 May 2010 13:07:55 GMT Server: YYY Last-Modified: Mon, 24 May 2010 19:40:18 GMT ETag: "336095c-6be0-35e84c80" Accept-Ranges: bytes Content-Length: 27616 Vary: Accept-Encoding Connection: close Content-Type: text/plain X-Pad: avoid browser bug Length: 27,616 (27K) [text/plain] |
You can try to add to the the following to either .htaccess or httpd.conf:
Code:
AddType application/octet-stream otf Fonts does not have defined MIME types yet, but you could replace the above with Code:
AddType font/otf otf The reason you get type Content-Type: text/plain is because this is the default MIME type in apache (DefaultType text/plain directive in http.conf). So if the .otf file contains text then it will be rendered by the browser. But .otf files (Opentype Font Format) is supposed to be in a binary format so this is strange. As for the client side (firefox): Quote:
|
Thanks! That worked.
The odd thing is that the dev server doesn't have that mime type, but it still behaves as expected. |
All times are GMT -5. The time now is 07:00 PM. |