Rails 5.2 HTTP2 Early Hint nopush support

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Rails 5.2 HTTP2 Early Hint nopush support

Ho Kuen Leung
HTTP2 Early Hint support is added and will be released in 5.2
https://github.com/rails/rails/pull/30744

However there is no way to specify `nopush` in early hints when using javascript_include_tag / stylesheet_link_tag

Preload spec:
https://w3c.github.io/preload/?lipi=urn%3Ali%3Apage%3Ad_flagship3_pulse_read%3BwzEEHZvqToaWD2HAfSuSAw%3D%3D#server-push-http-2

This is necessary since there are servers with HTTP2 push support for early hints like Nginx
http://nginx.org/en/docs/http/ngx_http_v2_module.html#http2_push_preload

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Rails 5.2 HTTP2 Early Hint nopush support

Ho Kuen Leung
Also for fonts / JS, the current helpers does not support adding `crossorigin` attribute


5.2.x helper source:
https://github.com/rails/rails/blob/5-2-stable/actionview/lib/action_view/helpers/asset_tag_helper.rb

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.