News for hackers. Stuff that matters.
Re:Pre-rendering static websites with the 23 year-old wget c... by jake-low on Tuesday August 27, 2019 @01:06PM (#20812009)
Thank you for sharing this; I find the technique refreshingly simple.

> You may have seen people achieve this with a more complex headless Chrome-based solution, but for many sites, this will be perfectly fine!

Can you elaborate on the difference between using wget and a heavier solution? I assume the main difference is that a headless browser can execute JavaScript and then serialize the resulting DOM back to HTML, allowing you to build sites in client side frameworks (React, Vue) and then make static versions of them for deployment. Are there other benefits of using a full browser vs. simply using wget?

Re:Pre-rendering static websites with the 23 year-old wget c... by zeroimpl on Tuesday August 27, 2019 @10:54PM (#20816455)
I think this article unnecessarily conflates the pre-rendering techniques used for JS-heavy websites with what I would call a static website build/compile process.

Using wget to compile your website is a clever idea. But it won't work if your website uses JS to generate links, so I wouldn't call it pre-rendering (since there better not be any post-rendering)

Re:Pre-rendering static websites with the 23 year-old wget c... by tjholowaychuk on Saturday August 31, 2019 @08:00AM (#20845799)
Yeah it doesn't work if you're relying on JS for interactions and layout, but wget's crawling technique works great if you're happy with using server-side rendering for content.