Tipe MIME .otf: font/otf

File berakhiran .otf (font OpenType) menggunakan tipe MIME font/otf.

Diperbarui

font/otf
Tipe MIME untuk .otf
Font
Kategori
Ya
Kompres dengan gzip/Brotli

Apa tipe MIME file .otf?

Tipe MIME (media type) untuk file font OpenType dengan ekstensi .otf adalah font/otf. Format font desktop; konversi ke WOFF2 untuk web.

Header Content-Type

Content-Type: font/otf

Konfigurasi server

ServerKonfigurasi
Nginx (mime.types or types {})font/otf otf;
Apache (.htaccess)AddType font/otf .otf
IIS (web.config)<mimeMap fileExtension=".otf" mimeType="font/otf" />
Node.js / Expressres.type('otf') or res.setHeader('Content-Type', 'font/otf')
Amazon S3Atur Content-Type: font/otf pada objek (metadata), atau kirim --content-type font/otf ke aws s3 cp

Apakah file .otf perlu dikompres?

Perlu. Font OpenType berisi data yang tidak terkompresi, jadi mengaktifkan gzip atau Brotli untuk font/otf biasanya menghemat 50–80 % ukuran transfer. Pastikan daftar kompresi server kamu menyertakan tipe ini — cek dengan tes kompresi website.

Mengapa tipe MIME penting

Browser menentukan apa yang dilakukan terhadap respons — menampilkan, menjalankan, memutar, atau mengunduh — berdasarkan header Content-Type, bukan ekstensi file. Dengan X-Content-Type-Options: nosniff, tipe yang salah membuat stylesheet dan script langsung diblokir. Untuk unggahan, jangan pernah percaya tipe yang dikirim klien; periksa isi file (magic bytes-nya) di server.

Pertanyaan yang sering diajukan

Apa tipe MIME untuk .otf?
font/otf.
Bagaimana cara mengatur Content-Type untuk .otf di Nginx?
Pastikan font/otf otf; ada di blok types (biasanya di /etc/nginx/mime.types) lalu muat ulang Nginx.
Apakah file .otf perlu di-gzip?
Perlu — format ini sangat mudah dikompres, jadi tambahkan tipe ini ke konfigurasi gzip/Brotli kamu.