5 ms·
Doesn't that also involve an extra HTTP call? I discussed the same issue as OP a while ago: http://branchandbound.net/blog/web/2012/11/unify-server-side-client-
by SanderMak 14y ago
Doesn't that also involve an extra HTTP call? I discussed the same issue as OP a while ago: http://branchandbound.net/blog/web/2012/11/unify-server-side-client-side-rendering-embedding-json http://branchandbound.net/blog/web/2012/11/unify-server-side...
Someone in the comments there mentioned a nice alternative to embeddding the data in a <script> tag to avoid the problem jashkenas raised (</script> in the JSON). Namely, setting it in a data- attribute.