GoogleChromeLabs / http2push-gae

Drop-in HTTP2 push on App Engine
https://http2-push.appspot.com/
Apache License 2.0
141 stars 18 forks source link

Support new Link rel="preload" header #1

Closed ebidel closed 9 years ago

ebidel commented 9 years ago

The Link rel="preload" is the new standard header as described in http://w3c.github.io/preload/. It would be good to preemptively support this. The X-Associated-Content is an old SPDY header.

https://www.chromestatus.com/features/5757468554559488

igrigorik commented 9 years ago

Yes, please! Support for X-Associated-Content will be deprecated.

ebidel commented 9 years ago

I knew you'd stalk this repo!

Question, is there priority in the Link header, or that's completely deprecated? Also is the as= final?

igrigorik commented 9 years ago

Yes, there is. It's an optional field but you should specify it where possible to give the UA and any intermediaries the context about type and priority of the resource:

p.s. current as is as "final" as any living spec can be :-)

ebidel commented 9 years ago

An priority level is gone?

igrigorik commented 9 years ago

Guessing you're thinking "pr", which is defined in Resource Hints spec?

The pr attribute is defined for speculative resource fetches: prefetch, prerender, preconnect. Preload, on the other hand, is a declarative fetch (the user agent must fetch it), so pr is a noop.

ebidel commented 9 years ago

Got it. Thanks for clarifying @igrigorik. Hard to keep all these specs sorted.

ebidel commented 9 years ago

Added support for the spec'd header. The X-Associated-Content is also supported for now.

https://github.com/GoogleChrome/http2push-gae/blob/master/http2push.py