Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable pre-loading of a typeform #625

Closed
shravanikandadai opened this issue Nov 3, 2023 · 4 comments
Closed

Enable pre-loading of a typeform #625

shravanikandadai opened this issue Nov 3, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@shravanikandadai
Copy link

Hi,

I would like to know if it is possible to pre-load a form and display it when necessary. Right now, though the form is mounted to the DOM, it only loads when the DOM element to which the form is added to is physically visible.

@github-actions github-actions bot added the new Flag for new issues before someone replies label Nov 3, 2023
@mathio
Copy link
Contributor

mathio commented Nov 3, 2023

Hi @shravanikandadai

for which embed types would you want this?

Note that it might mess up your metrics, because preloading would count as a visit even though the form would not be visible (yet).

@mathio mathio added enhancement New feature or request and removed new Flag for new issues before someone replies labels Nov 3, 2023
@shravanikandadai
Copy link
Author

shravanikandadai commented Nov 3, 2023 via email

@mathio
Copy link
Contributor

mathio commented Nov 7, 2023

The inline embed (when displayed out of the current viewport, eg "below fold") is preloaded automatically.

I can see this might be valuable for other embed types.

@shravanikandadai can you please share more details on your use case?

@mathio
Copy link
Contributor

mathio commented Feb 21, 2024

After doing some testing it looks like preloaded forms do not sufficiently decrease the perceived loading time. We do not want to load unnecessary resources on host page if the embed modal might not be opened.

When the modal is preloaded (left) it loads only slightly faster compared to current implementation (right):
https://github.com/Typeform/embed/assets/1561771/767a3f45-e276-411e-9307-0e17856a990f

If you have a different use case, please feel free to share more details and reopen this issue.

@mathio mathio closed this as completed Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants