Sreekumar P
Sreekumar P

Reputation: 6050

Does HTTP2 server push only works for web assets?

Its been sometime I heard about server push,

Will HTTP/2 server push only works for web assets ?

or will it work for other JSON data also ?

Upvotes: 0

Views: 174

Answers (1)

Barry Pollard
Barry Pollard

Reputation: 45940

It can be used for any cacheable resource which will be used by that page.

Note however that there have been reports of confusion on how exactly to enable it for XHR resources as discussed here: HTTP2 Push XMLHttpRequest Cache Miss in Chrome

If you mean however for general JSON rather than XHR JSON that will be used by the page then no, that is not what HTTP/2 push is for. See here for more details: HTTP/2 Push JSON Payload

Upvotes: 2

Related Questions