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

Don't enqueue experiments.js when no experiments are in use #77

Open
johnbillion opened this issue Apr 28, 2021 · 1 comment
Open

Don't enqueue experiments.js when no experiments are in use #77

johnbillion opened this issue Apr 28, 2021 · 1 comment
Labels
could have Could be done, or nice to have, low priority for now

Comments

@johnbillion
Copy link
Member

The experiments.js file is always enqueued. It would be nice if this was only enqueued when something with an experiment is loaded on the page, to reduce page weight.

@roborourke roborourke added the could have Could be done, or nice to have, low priority for now label Apr 28, 2021
@roborourke
Copy link
Collaborator

roborourke commented Apr 28, 2021

We would have to enqueue the script just in time but right now we load it super early in the head to avoid things jumping around on the page and so that the custom web components can render immediately.

It's a trade off and the current behaviour is intentional but could possibly be made optional. Needs research to decide if we actually want to do it and if it'll negatively affect the behaviour of the site and the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could have Could be done, or nice to have, low priority for now
Projects
None yet
Development

No branches or pull requests

3 participants