Giter Site home page Giter Site logo

Comments (4)

ca136 avatar ca136 commented on April 28, 2024

@JefferyReidKnowde this looks like it might be the same as #19. If so, I'll close this out and we can track the work in the other ticket.

from builder.

steve8708 avatar steve8708 commented on April 28, 2024

Yeah I think this is a combination of requires explanation and possible duplicate. So - what Builder does when you load it is it requests/sends 2 things

  1. Static prerendered HTML
  2. JS + JSON to "hydrate" the HTML

Why?

In 99% of cases this is the best option. When in production, and assuming you have caching set to the default or a reasonable number for your traffic load, the prerendered HTML will always be the fastest way to get your Builder content loaded.

But to power anything dynanamic - be it custom code you have added, custom interactions you have added, animation, dynamnic components (e.g. carousel) - you need the JS + JSON to load. So Builder lazily loads this after the HTML - such that the user can see the page almost immediately (adduming it's cached - on staging if you have cache set to something small like 1 you will have to wait for a fresh render every time), and then all interactivity will be adde din shortly thereafter.

This is a very common approach used by Angular Universal, React/Next.js, Gatsby, etc as the optimal way to have fast performing and dynamic pages.

But you have options here

You can set prerender="false" to only make the JS+JSON request. This will be a tad bit slower in production
Or, you can set hydrate="false"to only load the HTML, but you can have nothing interactive or dynamic on your pages

All of that said, we have another ticket for a bug in the latest Angular SDK where you experience a flash when the hydration happens that shouldn't happen, and will be fixed with that ticket

Anyway, hope this information helps. Closing this particular ticket as no dev work seems to be needed as we already have the other one #19

from builder.

lyczos avatar lyczos commented on April 28, 2024

@ca136 @steve8708 actually setting prerender to false is not working (request is made but nothing is displayed)

from builder.

steve8708 avatar steve8708 commented on April 28, 2024

Thanks for letting us know @lyczos, #36 created to address

from builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.