Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That’s on first load – all future loads are significantly faster on this clone.


1.1Mb is 100 times larger than 11Kb.


That would be the case when the bandwidth was the limit, but it’s not.

The limit is in the immense latency for opening a new connection.

Opening a network socket with TLS can take over 4 seconds on mobile, which is why ideally you’d even use an open websocket for communication instead of new GET requests. Navigating to a page in this version causes one or two network requests, in the real HN it takes far more just to check if the images have changed, the CSS has changed, etc.


Using websocket looks like overengineering because HTTP/2.0 allows to use a single connection for multiple parallel requests.

Using React to build a simple (student level) site like HN is overengineering too in my opinion. If you don't want to reload the page when navigating you can just reload HTML content with jQuery or fetch() without using client side rendering, without draining device battery and without loading 1 Mb of Javascript that will take much more space in RAM.

SPA approach should be used for interactive applications able to work in offline mode, able to provide rich experience on mobile devices etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: