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

Limit to 20 preloads #59

Closed
twifkak opened this issue Feb 4, 2021 · 1 comment · Fixed by #62
Closed

Limit to 20 preloads #59

twifkak opened this issue Feb 4, 2021 · 1 comment · Fixed by #62
Labels

Comments

@twifkak
Copy link
Collaborator

twifkak commented Feb 4, 2021

The Google SXG cache has a limit of 20 preloads. I don't see anything in the webpackager code that guarantees that requirement is met. (Did I miss it?) We should provide a [default enabled] option to do so.

Seems especially necessary given the optional HTMLTask to promote preload tags to headers, where the former are more prominent today, with no such limit.

@yuizumi
Copy link
Contributor

yuizumi commented Feb 4, 2021

We don't have logic to limit the preloads to 20 (or any number), as far as I can recall. One easy approach is maybe to write a common processor to cut off Preloads (of exchange.Response) to the given limit, then register it as a postprocessor.

There's also a processor that propagates preload headers. (code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants