【问题标题】:How to use gzip and http2 at the same time?如何同时使用 gzip 和 http2?
【发布时间】:2018-11-04 12:23:15
【问题描述】:

我正在使用 webgl 并使用 .ktx,这种格式在未压缩时非常繁重。

使用http2或http1.1加载大小的结果:

  • https + http2:98mo,gzip 不起作用
  • http + http1.1:12mo,gzip 工作。

我想知道是否可以同时使用 gzip 和 http2?

以防万一,这里是我的 .htaccess(相关部分):

<IfModule mod_mime.c>
    AddType model/gltf+json           .gltf
    AddType image/ktx                 .ktx
</Ifmodule>

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE   "model/gltf+json" \
                                    "image/ktx"
</IfModule>

【问题讨论】:

    标签: .htaccess gzip http2 http-compression


    【解决方案1】:

    没有什么可以阻止您同时使用 gzip 和 http2。

    我只能猜测你只有在 http 虚拟主机中设置了 mod_deflate 配置,而不是在 https 虚拟主机中。

    【讨论】:

      猜你喜欢
      • 2021-04-07
      • 2019-07-03
      • 2023-03-28
      • 2011-02-09
      • 2019-03-17
      • 2023-04-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-22
      相关资源
      最近更新 更多