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

Streaming support #396

Open
1 task
Tracked by #395
harlan-zw opened this issue Sep 7, 2024 · 2 comments
Open
1 task
Tracked by #395

Streaming support #396

harlan-zw opened this issue Sep 7, 2024 · 2 comments
Labels
enhancement New feature or request v2

Comments

@harlan-zw
Copy link
Collaborator

Describe the feature

Related: #27

Most SSR js frameworks are streamable, we should support the same functionality with Unhead.

There is workarounds available but we should have an official solution that is documented.

Additional information

  • Would you be willing to help implement this feature?
@negezor
Copy link
Contributor

negezor commented Sep 8, 2024

The problem is that the whole application has to be pre-processed. Since we can't know what hooks/components will be called. The DOM elements themselves can only be inserted at the end of <body> or make a buffer to insert in <head>, which makes no sense in streaming. However, many web crawlers do not look beyond </head>, which makes SSR meaningless for SEO.

@harlan-zw
Copy link
Collaborator Author

Yes, the idea is most likely a sync API for v2 that does not support hooks. I need to investigate it more but I believe we could just push the raw tags as json and resolve them client-side.

The exact use case for this is a bit niche though and needs some more thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v2
Projects
None yet
Development

No branches or pull requests

2 participants