Live data from Hacker News

Untitled topic

news.ycombinator.com

1–2 of 2 posts

Re: undefined

#2
Modern front-ends often need a tiny bit of server-rendered data to kick-start hydration or to configure a widget. The usual answer is an inline that hydrates a global variable—but that approach triggers strict Content Security Policies, can’t be cached independently, and forces you to hand-roll parsing and error handling for every page. json-from-script smooths out that workflow by treating tags as a simple, declarative data transport that is safe under CSP.