Page MenuHomePhabricator

Correct the mime type for WOFF to application/font-woff
Closed, ResolvedPublic

Description

When viewing https://en.wikipedia.org/wiki/Wikipedia:Wikipedians I get the below content warnings in Chrome:

Resource interpreted as Font but transferred with MIME type application/x-font-woff: "https://bits.wikimedia.org/static-1.22wmf9/extensions/UniversalLanguageSelector/data/fontrepo/fonts/amiri/amiri-regular.woff?version=1.0.2&20120101". Wikipedia:Wikipedians:1
Resource interpreted as Font but transferred with MIME type application/x-font-woff: "https://bits.wikimedia.org/static-1.22wmf9/extensions/UniversalLanguageSele…or/data/fontrepo/fonts/SiyamRupali/SiyamRupali.woff?version=1.070&20120101". Wikipedia:Wikipedians:1
Resource interpreted as Font but transferred with MIME type application/x-font-woff: "https://bits.wikimedia.org/static-1.22wmf9/extensions/UniversalLanguageSelector/data/fontrepo/fonts/amiri/amiri-bold.woff?version=1.0.2&20120101". Wikipedia:Wikipedians:1
Resource interpreted as Font but transferred with MIME type application/x-font-woff: "https://bits.wikimedia.org/static-1.22wmf9/extensions/UniversalLanguageSele…ontrepo/fonts/LohitDevanagari/Lohit-Devanagari.woff?version=2.5.3&20120101". Wikipedia:Wikipedians:1
Resource interpreted as Font but transferred with MIME type application/x-font-woff: "https://bits.wikimedia.org/static-1.22wmf9/extensions/UniversalLanguageSelector/data/fontrepo/fonts/LohitOriya/Lohit-Oriya.woff?version=2.5.3&20120101". Wikipedia:Wikipedians:1
Resource interpreted as Font but transferred with MIME type application/x-font-woff: "https://bits.wikimedia.org/static-1.22wmf9/extensions/UniversalLanguageSele…r/data/fontrepo/fonts/LohitTelugu/Lohit-Telugu.woff?version=2.5.3&20120101". Wikipedia:Wikipedians:1

I wonder why these are all loaded (and in separate requests), but aside from that these warnings may be caused by something either in Chrome in in wmf's apache config or in ULS. Filing here for further investigation.


Version: unspecified
Severity: normal

Details

Reference
bz51593

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:44 AM
bzimport set Reference to bz51593.

https://gerrit.wikimedia.org/r/#/c/657 set application/x-woff as mime type for WOFF. The correct value is application/font-woff as per http://www.w3.org/TR/WOFF/#appendix-b

Change 76698 had a related patch set uploaded by Nikerabbit:
Use application/font-woff for woff files

https://gerrit.wikimedia.org/r/76698

Change 76698 merged by Dzahn:
Use application/font-woff for woff files

https://gerrit.wikimedia.org/r/76698

that has been merged, deployed and Apaches have been gracefulled now. please confirm it's fixed.

Works for me, except that many fonts are cached in Varnish with old mime type. I expect them to pick the new mime type when the caches expire.