Home
Sign Up
Sign In
V2EX
›
问与答
NGINX 下 Gzip 和 Brotli 不压缩字体文件。
1
ililili
·
Sep 25, 2022
· 2306 views
This topic created in 1502 days ago, the information mentioned may be changed or developed.
我在 gzip_type 、brotli_type 中添加了 font/ttf ,但是发现并没有起作用,这是为什么呢?
Supplement 1 ·
Sep 25, 2022
服了,是浏览器缓存的事,实际已经生效了……
brotli
font
ttf
Nginx
3 replies
Lax
Sep 25, 2022
1
先下载那个文件看看 content type 头是什么,在配置文件目录下的 mime.types 里看看配置没有
ililili
OP
Sep 25, 2022
2
@
Lax
是 application/octet-stream ,mime.types 里面有 application/octet-stream 但是没有 ttf ,我添加了还是不行。
Lax
Sep 25, 2022
3
按你这个配置,下载时是 application/octet-stream 不对。应该在 mime.types 把字体文件设置成 font/ttf 才会生效
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
1879 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 23ms ·
UTC 16:55
·
PVG 00:55
·
LAX 08:55
·
JFK 11:55
♥ Do have faith in what you're doing.
❯