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

You missed the point. If you "need to load a good bit of data on the user's first use" you've already failed. I've been coding professionally for about 20 years now and the only reason i've ever seen for loading a bit of data on the initial hit, is that the developer didn't spend the time to think about how to load the necessary pieces incrementally, as they were needed by the user. Instead they designed a system that needed a whole pile of crap on startup even if the user didn't.


I tend to disagree with the statement that you've already failed if you decide to eagerly load resources before they are used or needed. Take queue from Google or others who pre-fetch resources based on anticipated usage. In the world of SPAs and client-side heavy apps, combining resources into a single or logically grouped set of resources is common practice to cut down on the amount of overhead that many http(s) calls impose.

Also, the intended use of PleaseWait.js doesn't have to be used to stall while client side resources are brought down. This concept could easily be used for long running, server side processing.


I certainly agree. There are almost always ways to avoid "loading a good bit of data on the user's first use". But for your traditional SPA, it's quite common that you need to make a few AJAX calls to your backend API in order to fetch some data to show to the user. This was built for mostly that case, not for the "let's block the user's screen for 5+ seconds while we do unnecessary data fetches" case.

Edit: I misspoke when I said "a good bit of data" in my original response. I simply meant any API calls to your backend.


Agreed.

There's so many tools right now to find out exactly what your page or app is using and how to minimize what you're serving. Sure, it takes some effort, but your users will thank you in the end.




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

Search: