I’ll preface this by asking what you mean by page load times? Are you referring to transitions between pages (not technically loads), or literally hitting refresh? If you’re not tied to using Blaze, react has server side and client side rendering capabilities, although I’ve not personally worked with react.
SSR with Blaze for serving content is pretty hard in Meteor. If your content is mostly static, there is a workaround you can try, failing that you can always directly intercept the requests with use of WebApp.connectHandlers.use. I’ve tried it with the workaround AND with the direct intercept, load times are < 1 second on a PC.
Meteor’s WebAppInternals global provides a few useful methods/objects for this:
-
WebAppInternals.getBoilerplate({...}, "web.browser") - this returns the bolierplate HTML required to render a page. You can also pass in web.browser.legacy.
-
WebAppInternals.staticFilesByArch["web.browser"][pathDef] = { content: populatedHtml }; - you can cache “static” HTML here. If you use a package which enables reactivity on the server you can even update this value when the template you want to render changes. populatedHtml is the combination of the boilerplate + the route specific HTML you’ve generated.
Failing this, you can directly intercept the request using WebApp.connectHandlers.use - however, you ultimately use the same function getBoilerPlate.