httpbin - 协议调试工具
httpstatuses - 协议状态码查询
httpie - cURL-like tool for humans
Fiddler
litchinn
V2EX  ›  HTTP

关于 nginx 配置 http2 的 server push 的疑问

  •  
  •   litchinn · Feb 26, 2021 · 1979 views
    This topic created in 1903 days ago, the information mentioned may be changed or developed.

    例如 vue 项目打包后,在 /js 或者 /css 包中有许多资源,想通过 server push 直接推给浏览器,那么改如何写配置呢? nginx 官方说:

    Pre-emptively sends (pushes) a request to the specified uri along with the response to the original request. Only relative URIs with absolute path will be processed, for example:

    http2_push /static/css/main.css;

    The uri value can contain variables.

    uri 可以包含变量,这里的变量是怎么个写法呢,是指“*”这样的匹配方式吗,能将 /js 或 /css 中的部分资源进行推送吗?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   934 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 21:20 · PVG 05:20 · LAX 14:20 · JFK 17:20
    ♥ Do have faith in what you're doing.