How to "Eliminate render-blocking JavaScript and CSS in above-the-fold content" in Meteor?
After implementing a working solution for this problem, I'd say that the rightTM answer to your question is: "No, that's just what you get for using such a complex javascript framework."
But it's still a fact that loading meteor can take over a minute, on slow networks. It is huge. That makes for an awful UX. So I think it would improve a meteor app overall to have something like a loading screen.
I'm writing a package kriegslustig:altboiler
(I'll update this as soon as I do the first "major" release).
I documented the solution that I'm using in altboiler
in this repo. It got pretty long, so here's a summary:
WebApp.connectHandlers
WebApp.clientPrograms[WebApp.defaultArch].manifest
script
tagscript
tag into the head
That way you won't get that error on Google Pagespeed.
You could serve a loading screen first or you could also render the whole site without the parts that need a connection to the server.
I expected this to load Meteor a lot slower, but in my initial test Meteor actually loaded faster. My test wasn't exactly scientific though. I simply loaded it in the Chrome emulator and throttled the connection to 50kbps
. Also, I did this on a dev instance, so it was uncompressed. The results are still somewhat relevant though:
Without altboiler
: 1.7min
With altboiler
: 2.8min
The ajax requests only perform better when there are a lot of requests made. So presumably the impact on a bundled instance could range from slightly worse to slightly better.
It might intervene with the spiderable
package, but I don't think so. I'll test it when I've written some tests for the package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With