TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Is there a CDN that pre-renders the app on the server?

2 pointsby kirillrogovoyover 3 years ago
I got a crazy idea this morning.<p>What if there was middle-man (CDN, proxy, etc) that sits between the browser and the target service and, for each page request, it would act as a headless browser, visiting the target page, running all the JS and doing the rendering, and then dumping the DOM tree to HTML and serving it to the client (with zero JS)?<p>So the target app could be 100% JS-rendered but it&#x27;d look to the browser as though it&#x27;s just a static HTML page.<p>(I know that the question then is &quot;doesn&#x27;t it mean that the website would end up not being interactive because the JS doesn&#x27;t get delivered to the browser?&quot;, but I imagine use cases when it&#x27;s not really a concern)<p>Is there any project on the Web that does anything remotely similar to this idea? The core thing is using a headless browser to do all the JS-initiated rendering on the server before the content hits the browser.

5 comments

kirillrogovoyover 3 years ago
As a side note, I can imagine this approach being used for a customer-facing &quot;proxy server&quot;.<p>E.g. there are people who disable JS by default and enable it for the websites they trust or when the page is completely dead without running JS.<p>I imagine an improved &quot;Disable JS&quot; function that (1) makes sure your browser doesn&#x27;t run any JS but (2) ships a normally rendered page.
j_alexover 3 years ago
I am currently developing kind of what you&#x27;re looking for! <a href="https:&#x2F;&#x2F;browser.staging.jimber.io" rel="nofollow">https:&#x2F;&#x2F;browser.staging.jimber.io</a> You can interact with the browser on the backend (the headless one). But we could take out the &#x27;small&#x27; part that renders the webpage in it&#x27;s inital stage
milosonatorover 3 years ago
I think basecamp is working on this kind of technology, but I think it is somewhat common for some performance focused shops to pre-render their initial HTML and cache it in their load balancer.<p>Basecamp I think is taking it a step further.. read more here: <a href="https:&#x2F;&#x2F;hotwired.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hotwired.dev&#x2F;</a>
shabdaover 3 years ago
Is Mighty Browser (<a href="https:&#x2F;&#x2F;www.mightyapp.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.mightyapp.com&#x2F;</a>) what you are looking for?
评论 #28826702 未加载
wizwit999over 3 years ago
this would be really inefficient, stuff like server side rendering for react is what&#x27;s used