6 ms·
Though in this case rendering the page with JavaScript probably would have taken the load off your sever and prevented it from denying requests.
by supercoder 12y ago
Though in this case rendering the page with JavaScript probably would have taken the load off your sever and prevented it from denying requests.
- collyw 12y agoYou should aim to have a page that will degrade gracefully without JavaScript. So in what way would using JavaScript help?
- pdkl95 12y agoThe best speed, obviously, would be to simply serve up static pages (possibly cached from a dynamic template, if necessary). Rendering only with javascript is only useful when the client loads and runs the javascript. The rest of us that see javascript as a very serious security and privacy issue get the actual page that is served up. I strongly recommend making that page a useful page in some way. If a tool or framework doesn't provide that page, then maybe it's time to start filing bug reports about that tool's broken output.
- krapp 12y agoTo me, rendering in javascript makes the most sense when you expect incremental updates. For instance, a forum or comments page where finding and fetching a couple of new bits of text would obviously take less effort than rendering and serving the entire document for that same bit of text. I would agree with you that if you have a page that never changes, and there's no benefit to fetching assets asynchronously, and you're not doing anything dynamic, then you might be better off with static pages and caching. Although to be fair, the number of people on HN who care about the security implications of javascript are grossly out of proportion to the general case. Near enough to 100% of people have javascript turned on by default that everyone else might as well be a rounding error.