Hacker News new | ask | show | jobs
by xrstf 3628 days ago
I'm pleasently surprised that the generated sites work just fine with JavaScript disabled (at least on the author's blog). Which on the other hand makes me wonder why I (as the visitor) need to download a 700KB JS blob that contains all blog posts, React and other things just to read the content.

Without JS: 4 requests, 20 KB transferred, DOMContentLoaded @ 360ms

With JS: 27 requests, 518 KB transferred, DOMContentLoaded @ 22.07s (includes Disqus)

For caching purposes, it might make sense to split the bundle.js into a app.js and content.js and only update the content.js on re-deployments. Not sure if this is just on the author's blog or on every site built with Gatsby.

2 comments

As long as the top of the article content (headline + first few paragraphs) loads immediately I don't care if it loads 700kb afterwards for other interactive content. 'Progressive enhancement' should be the primary goal; size reduction is just one means to achieving that but not always required.

From testing out one of the example blogs and this doesn't seem to be a UX issue:

https://bricolage.io/tools-administer-facebook-groups/

That's not progressive enhancement, it's lazy loading.

Progressive enhancement would be making all of the content visible and accessible, then adding functionality on top after the base page load is complete. If JS is required to simply view the text on a page, you're doing it wrong.

GP clearly stated that JavaScript is not required to view the text on the page.
Is that not a rewording of what I just said?
You might not. A capped-bandwidth or pay-by-the-byte mobile user might.
What this tells me is that the only important part of the site (the content) is 20KB in size, and that the other 498KB is mostly for developer convenience?

How is this a good tradeoff? A 25x increase in page size justifies what kind of benefit?

For efficiency's sake in general, not to mention for a drastic reduction in data usage for mobile users or users with slow connections, I don't see why so much extra cruft is necessary.

When I click around the site, page loads are instantaneous. Very nice user experience.
You can provide the same user experience without adding all the site content in a unique bundle. Take a look to http://phenomic.io/
The value added as I perceive it by gatsby is instant page changes on link click. Is it possible to make phenomic preload at least some of the pages, as I really don't see what benefit it can provide otherwise?