4 ms·
They could be using http streaming, like the feature introduced in rails 3.1 : http://weblog.rubyonrails.org/2011/4/18/why-http-streaming/ http://weblog.rubyonr
by oelmekki 14y ago
They could be using http streaming, like the feature introduced in rails 3.1 : http://weblog.rubyonrails.org/2011/4/18/why-http-streaming/ http://weblog.rubyonrails.org/2011/4/18/why-http-streaming/
That actually makes <head> the preferred place for loading scripts.
Also, I find it a bit extreme to recommend putting inline javascript in a <script> tag. I'm ok with trying to maximize performances, but please, do not recommend to produce un-seperated and unclean code. Concatenating javascript in a single file (and compressing it) is way enough, having one single request to get all javascript is not so bad.
- judofyr 14y agoI think he meant something like: <script><%= File.read("file.js") %></script> Not that they should literally move the script inline.
- jaffathecake 14y agoIn which case loading the scripts async would be the right thing to do. Early loading, but non render-blocking http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#dom-script-async http://www.whatwg.org/specs/web-apps/current-work/multipage/...
- emidln 14y agoWhat's unseparated about it? Maintenance doesn't have to be performed on the rendered final product. Template systems and processing pipelines are pretty common for letting devs keep code structured in useful ways while still allowing for optimal end results.