Skip to content

Allow for more granular control over preloading scripts #294

@Ingramz

Description

@Ingramz

🆒 Your use case

Currently when a consent trigger or a manual trigger is used to load a script, the rel=preload tag becomes a rel=preconnect, in privacy sensitive situations leaking the IP address by preconnecting may be undesirable and we want total control over the way when we want the user's browser to connect to a server hosting a script.

On the other hand there may be also situations where we are fine with preloading the script for the user, but we want to delay the evaluating of that script to the last possible moment. This means there also exists a combination where manual trigger and rel=preload can be desirable.

In consent-based triggers, we may want a combination of both depending on the consent given. For instance, when we have already collected consent from the user, we can start including rel=preload in head at the server side and before that we should not be loading anything.

🆕 The solution you'd like

I think it's difficult to outline a solution that would surely work for everyone, at least without giving it some additional thought. But at the moment I feel that it is too difficult to control the preloading behavior if the default behavior for some reason is not suitable.

Since my main use case involves triggering on consent, I may be currently too blind to see other valid cases where preloading may be wanted to be controlled differently from the default. Perhaps this is where insight from others may also be helpful and I hope that at least by starting a discussion, a more flexible solution can be worked towards.

🔍 Alternatives you've considered

No response

ℹ️ Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions