3 ms·
I'm really confused by this: > Notably, neither of these pages has any external resources. I wanted to control for that variable and understand the best you co
by viraptor 11y ago
I'm really confused by this:
> Notably, neither of these pages has any external resources. I wanted to control for that variable and understand the best you could do theoretically with either approach.
That's not the theoretical best in any way. The theoretical best is script tag pointing to a popular CDN, which has been loaded by this or another site before and is already in browser memory when you open this page. Then your page can be basic template+data with no code inlined.
- sanderjd 11y agoI think you may have misunderstood. He is referring to the data, not the code. That data is usually user-specific and using a "script tag pointing to a popular CDN" is very unlikely to be workable.
- viraptor 11y agoHe's referring to both actually. No external resources means that the page he's testing contains all of: html boilerplate, templates, data, script that puts it together. Comparing that to an equivalent page with everything rendered is kind of like comparison between a static "hello world" page to a cms rendering a "hello world" page. In reality you're likely to have the templates already cached from previous requests and the templates rendering framework available from a CDN. What you end up transferring to the user is actually the data + tiny part of the script that gets rendering started.