Skip to content

Comment on Ask HN: Serving rendered html and static content vs. building APIs

Comments

Like all questions, it really depends.

I would build out your project entirely first then look for possible optimizations like this. You will need to see how often this content changes, how often it is requested and the cost of regenerating it. In addition to this, you will want to look at the added engineering costs of this.

If it's something that rarely changes, I usually just have a background job generate it and serve it as static content, but only if it is accessed a lot.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.