-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add an HTML attribute to delay JS execution after ActivationStart #290
Comments
I'm definitely in favor of this. It's an idea we've had for some time, but were kind of waiting for evidence that it would help in the real world. (In particular, we were unsure on how many third parties are manually added vs. using tag managers.) Hearing this from you helps a lot! The biggest challenges here are surface-level ones, IMO. In particular:
Just off the top of my head, my current favorite idea is to extend the |
Some idle musings... I wonder if "activation" is too tied to speculation rules and this should be more generic for other use cases - like after a tab opened in the background is foregrounded? |
This could also be useful in terms of activation performance. We saw some cases where async scripts prevent |
My handwave was something like The interaction with Maybe we could reuse |
I suggest the addition of a new HTML attribute to indicate whether or not a specific <script> should execute before or after activationStart.
Benefit
Having this option would have these benefits:
Use case
I am thinking about sites having several ad providers (or analytics).
More aggressive pre-rendering options can skew analytics/ads data.
Unless all these 3rd party providers take into account activationStart I want to be able to easily control delaying them from doing any work.
The text was updated successfully, but these errors were encountered: