31 points · by nikolay · 11y ago · 18 comments
0: https://www.facebook.com/notes/facebook-engineering/bigpipe-...
I realize that YouTube is a crazy hard problem to tackle, and that is probably why stuff like this is necessary.
In dynamic navigation, only fragments are sent, using JSON as transport.
Why not HTML as a transport? <div id="bar"></div>
<% link_to "Load #{@widget}", @widget, remote: true, id: 'foo' %>
$("#foo").on("ajax:success", function (e, data, status, xhr) {
$("#bar").html(xhr.responseText);
});
I thought rendering partials and dynamically replacing them has been a standard feature of most frameworks. Rails even renders a working link so the page works without the javascript.