These are chat archives for appsforartists/ambidex

Feb 2015
Julien Nakache
Feb 05 2015 20:24
Random thought about using inlined css for ambidex: while rendering on the server, it will increase significantly the payload because of css rules duplication. But! 1. Duplicated code lends itself very well to gzip compression. 2 Will css-layout, you could render just the html / css that is above the fold and easily decrease the size of the initial html payload by factor (height of your page / 1400px ). Pretty cool right ?
Brenton Simpson
Feb 05 2015 20:39
@jnak interesting thought. Honestly, we don't do anything with the CSS server side right now
It's just a bundle that gets sent to the client. The ambidextrous part is in rendering JSX in both environments
Wait, I think I see what you're saying. If you use inline styles, those will be sent twice (once as markup and again as JS)
so you're wondering if Ambidex could know that and remove the below the fold styles before rendering to a string
that sounds more like a React thing than a Ambidex thing. (I would like to get an issue going on the React issue tracker to keep track of all the potential server optimizations @sebmarkbage alluded to)
It'd be interesting to see what the tradeoff is, because you'd be forcing a rerender/reflow when it hits the client (as your server-side HTML would no longer be valid)
probably not a big deal, because react renders quickly
but interesting to consider