Ruby on Rails Wednesday, November 11, 2015

Yeah, thanks for the tip.  I will disable it for streaming responses.  For my specific app it is not a concern since I don't stream HTML responses, and the script relocator is only active for text/html responses.  I will add detection for streaming and leave the response alone if it is a streaming response so I don't have to worry about it if I later decide to stream text/html responses (like from a document archive).


On Wednesday, November 11, 2015 at 11:45:36 AM UTC+1, Frederick Cheung wrote:

For a faster initial render of my pages, I have added a script relocator initializer that scans the page and moves all script tags to the bottom of the body tag.  Order is kept, and the script tags in the `head` tag are marked with data-turbolinks-eval="false" so they are not executed again on new pages when using turbolinks.


Off the top of my head, it seems like it would not work with http://api.rubyonrails.org/classes/ActionController/Streaming.html - which may or may not be a concern.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/91ad0cea-c52a-4830-a55a-5fcba9be0465%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment