5 ms·
How is that possible if you're comparing the same data loaded on the client vs the server? Server has a faster Internet connection and connects to the DB direct
by simplecomplex 7y ago
How is that possible if you're comparing the same data loaded on the client vs the server? Server has a faster Internet connection and connects to the DB directly (not over HTTP).
Sure, clients load "faster" if you mean they don't actually load everything. Apples to oranges.
If a page needs to make 5 DB queries to present a bunch of data, those 5 DB queries will be faster on the server than from the browser. So will parsing the response and transforming it into HTML.
- theptip 7y agoYou can do the first render without loading everything from the DB, then load your more expensive data while the page is loading. Or do infinite scrolling and only load 10 rows from the DB, where you would have to render more rows to be usable if you didn't have infinite scrolling.
- pmontra 7y agoIf you're creating a desktop application in the browser, a SPA is the way to go or the experience will be nightmarish for both users and developers. For anything else a classical server rendered web app is OK. Example: Amazon is not a SPA.