My man, let me introduce you to ... HTML. It has "time to interactive" at 0.0 seconds and content paints instantly!
My man, let me introduce you to ... HTML. It has "time to interactive" at 0.0 seconds and content paints instantly!
This application is generating HTML on the server, but so does PHP. A Web site backed by a PHP application is the antithesis of a static site.
If you can elaborate on how statically-served HTML would render orders of magnitude faster than server-sider-rendered HTML with a similar response time, I'd love to hear it.
As other posters have pointed out, why not do it in HTML from the start? It's more simple and efficient than this -or any- framework. Just drop the ol HTML file on your server and away you go!
I understand that the supposed "real" utility in this would be when you want to do JS-y things in HTML (auth, API, hand state, etc), but they don't show any of that on their showcase site...so...yeah.
But this example does showcase a few things you don't typically get with a single vanilla HTML file:
- JSX + reusable/shared components
- Multiple URLs / pages
- Tailwind
Clicking around with the Dev Console open and watching the pages in Sources was enjoyable.
Someone mentioned rails, and rails have a lot of facilities to set correct cache headers for assets (css, js, images etc) and for dynamic content (for logged user in and/or for pages that are dynamic but public).
If you're deploying static files via a vanilla web server, you also get a lot of that for free, via the file meta-data.
I would expect a framework for publishing sites to showcase a minimum of good caching (client cache, ability to interact with a caching reverse proxy like varnish - and/or a cdn).
I'm not sure Deno(the service, not Deno the language) are actualy proposing a model - similar to Cloudflare, for example - where you have your infra somewhere and they only host the "edge", in a CDN, or spread around the world.
The browser still has to fetch and render the HTML. JS-heavy sites do tend to be slower, but no site has a 0s TTI/FCP.
How are the cache control headers with this set-up - is there a varnish or similar cdn/cache doing useful work (I'm assuming not, more importantly I'm worried pointing something like fastly at this will fail in caching static pages?).
Not how I read it - the first link is to a site deployed via "deno deploy", the last one is a link to the same content in a playground.
>> Hosted on Deno Deploy, this little website is able to acheive a perfect pagespeed score. Serviced from an anycast IP address over encrypted HTTP from 29 data centers around the world, the site is fully managed and will be available indefinitely at zero cost.
>> Everything mentioned here can be viewed on a playground.
For what it's worth, the deployed site seems a little snappier to me now on mobile - maybe I'm just less grumpy after dinner...