[AskJS] Screenshot API that renders Heavy JS websites properly
Spent the last week building a small screenshot/PDF API in Node.js mostly because Puppeteer kept making simple things weirdly painful in production.
Things that sounded easy:
- take screenshot of URL
- export page as PDF
- done
Things that actually happened:
- fonts/icons randomly not loading
- cold starts killing response times
- memory spikes on heavier pages
- pages “finished loading” but JS content still missing
- different rendering behavior between sites/frameworks
One thing that surprised me most was how much browser reuse/pooling helped compared to launching a fresh browser per request.
Also started testing short-term caching for repeated renders and it reduced a lot more load than expected. and JS heavy website those were really hard to deal with but slowly render became consistent and it got better
Still very much a beta/experiment right now, but it’s been interesting going deeper into browser automation/rendering infrastructure than I originally planned 😅
Curious what the most annoying Puppeteer/Playwright issue people here have dealt with is.