Skip to content

Comment on Web dev is still fun if you want it to beparent

Comments

I started out with Server Side Includes on a shared host, but converted to using PHP along the way to be able to make a base file with all the stuff that is repeated (header, main, footer etc), and then injecting the content from index.php, /contact/index.php etc.

I have a static file download only webapp[1], and I managed to get the includes done with only a 99-line JS component.

Honestly, once you get a decent way to specify, in HTML tags, include files, a significant portion of what you use a framework for (DRY) becomes redundant.

[1] Dynamic data to hydrate elements on the page is via API-only URLs.

AboutSource Built by g1lg1l

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