浏览器端建议的HTTP/2服务器推送 [英] Browser-side suggested HTTP/2 server push

查看:156
本文介绍了浏览器端建议的HTTP/2服务器推送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在客户端需要实际使用它们之前,浏览器客户端是否可以使用任何特定规范的过程来动态鼓励服务器使用HTTP/2服务器推送将服务器将其他请求的项目推送到浏览器缓存中端事件或WebSocket,这里是btw,而是HTTP/2服务器推送)?

Are there any specific spec'd processes that a browser client can use to dynamically encourage a server to push additional requested items into the browser cache using HTTP/2 server push before the client needs to actually use them (not talking about server-side events or WebSockets, here, btw, but rather HTTP/2 server push)?

推荐答案

尚未正式指定浏览器要求服务器推送资源的任何内容.

There is nothing (yet) specified formally for browsers to ask a server to push resources.

浏览器可以找出需要哪些辅助资源来呈现主要资源,并可以在随后的带有HTTP标头的请求中将该信息有机会地发送到服务器,但是正如我所说的,这尚未指定.

A browser could figure out what secondary resources needs to render a primary resource, and may send this information to the server opportunistically on a subsequent request with a HTTP header, but as I said, this is not specified yet.

[免责声明,我是Jetty HTTP/2维护者] 另一方面,服务器可以了解浏览器要求的资源,并可以建立相关资源的缓存以供他们推送给客户端.

[Disclaimer, I am the Jetty HTTP/2 maintainer] Servers, on the other hand, may learn about resources that browsers ask, and may build a cache of correlated resources that they can push to clients.

Jetty提供了可配置的 PushCacheFilter ,该实现策略,并实施了 HTTP/2推送演示.

Jetty provides a configurable PushCacheFilter that implements the strategy above, and implemented a HTTP/2 Push Demo.

这篇关于浏览器端建议的HTTP/2服务器推送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆