Open mitar opened 8 years ago
Some questions with server side rendering:
*.html
files which add things to <head>
and <body>
Meteor.userId()
component.subscribe
immediately return, be a no-op, and pretend it is subscribed? how do we provide then things like subscription scope? also, publish functions tend to limit the fields available to the client, and client might assume that no extra fields are available and render everything available, with no-op implementation of subscribe, all fields would be available and this might reveal sensitive information (imagine a component which simply calls EJSON.stringify
on documents)I have a general question about SSR in Meteor in combination with BlazeComponents.
Let's say I have a shop and want everything to be static (SSR or Caching p.e. thru Ngnix), except the "add-to-shopping-cart"-functionality and "your-last-viewed-products-history"-functionality.
How would you approach this as a pro? is this currently possible in Meteor at all?
Not really sure. I have not looked yet much into server-side rendering.
I created a topic for discussion on https://forums.meteor.com/t/ssr-rendering-wholepunching/20680
Preliminary testing looks pretty promising. Many tests are already passing. It seems that if the author is precise how they define components, things work. So no jQuery changes of DOM, and state local to the component instance, without global state.
This pull request would help that we do not have to copy too much code from the
templating
package: https://github.com/meteor/meteor/pull/5903