(02-17-2015, 09:58 AM)mwhitney Wrote: I don't really see the point of loading the page faster just to display a broken table and a spinning icon until the page completes a second request for the data. After all, the data can be sent along with the page, even if you still want to build the table in JavaScript. The only real justification I can see for something like this would be in the case of a long-running query which is triggered by the first request (which then returns the page without the data) and cached until the second request is received. Doing something like that tends to be uncommon in PHP, for various reasons.
It's not a broken table, it's an empty table. And the faster loading time of the page is just a side effect that I like. It's certainly not the main reason why I do it this way! The main reason is to prevent having PHP and JS code doing the same thing. Coding things in double is the best way to have nasty bugs!