3 ms·
Actually, JavaScript often is not good for that either. Static sites compress really well, and static HTML typically renders orders of magnitude faster than run
by dwheeler 7y ago
Actually, JavaScript often is not good for that either. Static sites compress really well, and static HTML typically renders orders of magnitude faster than running JavaScript to create commands to eventually do the same thing. In addition, running JavaScript is typically far more power draining on a client than rendering HTML. Web browsers are extremely optimized to render HTML. There is also the advantage of working correctly when people do not have JavaScript enabled.
On the other hand, if you need a site to work even with spotty internet access, JavaScript is probably your answer.
But these are generalities, you can probably find a thousand exceptions. It is hard to give truly general advice because there are so many exceptions.
That said, there are many good reasons to have static sites when you have to scale up big. They typically can handle very large scales, and caching them the super easy.
Whether or not that actually meets the requirements of a site is a completely different story.