#Edge Storage: TTF Should Have Correct Mime Type (font/ttf)
21 messages · Page 1 of 1 (latest)
+1 can confirm, I use .ttf as well as .eot, .woff and .woff2, this should be added.
I see, i'll have those fixed internally. If you urgently need a fix you can make an edge rule that sets the correct content-type header.
Hey Sunil, thanks for this, could you also please mention that .js should not be returning application/javascript? This is deprecated. The correct return value is text/javascript.
I'll take a look with the team for that as well.
Per IETF RFC 9239 text/javascript is now standard and application/javascript is now considered obsolete
Thank you for the recommendation! I will do this now.
^ Can confirm this will work! @worldly folio
I'm actually using the headers to apply edge rules with đ (caching headers)
I've had to hard code handling the .tff extension for now.
Ah right.
I was also going to suggest setting type="font/ttf" and preloading the font to avoid issues but I see.
It might be a breaking change for some (at least for me), since I'm using the content headers returned by edge storage to figure out caching (to reduce the number of edge rules involved). Not a big deal, but it would be nice for a heads up so the rules can be adjusted.
I always define the content type personally, to avoid MIME sniffing.
Ah okay.
Yeah, same, sniffing is disabled by header policy. It's not a big deal since the TTF font's in my use-case are to generate PDF's client side (not even used for the DOM), everything else is using WOFF2 variable fonts - thankfully baseline now.