While loadtime optimization we turn many adjusting screws, which all have different efficiency and need different afforts.

Is it not better to prerender all, or most important, pages and to guarantee, that Google and our visitors get a blazingly loading plane HTML document?

Prerendering can be bought as service, or implemented on own server. Anyway, this will be a single action we need - instead of many optimization steps, different stackeholders, different dependencies we have, if we optimize every single loadtime facet.

Prerendering is already brightly used for aking crawlable Javascript-based sites. What argues against prerendering of PHP/MySQL sites ?

  • Sites built with PHP and may mysql usually serve HTML already without any JavaScript. What do you suggesting pre-rendering would do for such sites? Feb 22, 2021 at 17:20
  • You are right, indeed. But prerendering creates a plain HTML page, which will be delivered to both of Google and visitors. DB queries, PHP and js execution are away. I even optimized on this way an outdated CMS page from about 40 to more then 90 PSI points - only with prerendering and with 15 minutes of time affort. I mean, why all struggle with TTFB, LCP TTI and other particular stuff, if a prerendered page is a plain HTML, which loads ways faster as an PHP/MySQL/JS/CSS/WOFF... page?
    – Evgeniy
    Feb 22, 2021 at 17:23
  • I can see how you could create an HTML cache to eliminate database calls, but how would you get rid of JS, CSS, and WOFF? Prerendering a Anguar site doesn't usually get rid of any of those. It just creates the initial HTML server side rather than client side. Feb 22, 2021 at 19:23

1 Answer 1


"It depends" - On the functionality of the site and the tradeoffs one is willing to make. Pre-rendering is indeed very useful for static, high volume pages or static pages where cpu is very constrained - but you give up an awful lot to get there, including a lot of user interactivity and harder maintenance.

Computers are unbelievably fast (and some software - like Wordpress with lots if plugins stupidly bloated). The problem here is not dynamic content, its trying to be all things to all people. Of-course many of these frameworks have plugins ehich effectively pre-render pages on denand using caching.

Writing lightweight dynamic content can be almost indistinguishably aa fast as static content - and in these circumstances other factors like latency, bandwidth, disk IO, memory [caching[ can be larger concern then CPU.

Of-course, static files can often cache better and can be easier to secure.

Prerendering can speed up complex sites, but in the simplest cases MySQL is a database and a filesystem is a database - but MySQL will allow me to index multiple keys, making searches faster on things other then a filename index.

If its speed over everything, you dont need per-user customisations and you can ignore the savings of a general solution over developer time costs - yes, pre-rendering is better. Those are big ifs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.