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

Resource Hints Builder #10631

Closed
septs opened this issue Jan 20, 2023 · 2 comments
Closed

Resource Hints Builder #10631

septs opened this issue Jan 20, 2023 · 2 comments

Comments

@septs
Copy link
Contributor

septs commented Jan 20, 2023

I think can add a new api, simplify resource-hints complex, improve page render speed

on page variable (on render hooks and shortcodes using)

.ResourceHints.Prefetch <url> <as-type>
.ResourceHints.Prefetch "https://example.com" "document"
.ResourceHints.Preload <url>
.ResourceHints.Prerender <url>
.ResourceHints.Preconnect <url>
.ResourceHints.DNSPrefetch <url>

on base of (head partial)

{{- range .ResourceHints }}
<link rel="{{ .Rel }}" href="{{ .Href }}" {{- with .As }} as="{{ . }}"{{ end -}}>
{{- end }}

or (alternative using method)

{{ .ResourceHints }}

via fmt.Stringer use preset template to HTML format (like .TableOfContents)

I would like to implement this API if possible on Pull Request


References:

  1. https://www.w3.org/TR/resource-hints/
  2. https://www.smashingmagazine.com/2019/04/optimization-performance-resource-hints/
  3. https://blog.cloudflare.com/early-hints/
  4. https://developers.cloudflare.com/cache/about/early-hints/
  5. https://nitropack.io/blog/post/early-hints
@bep bep removed the NeedsTriage label Jan 20, 2023
@bep bep modified the milestones: v0.109.0, v0.111.0 Jan 20, 2023
@bep bep modified the milestones: v0.111.0, v0.112.0 Feb 15, 2023
@bep bep modified the milestones: v0.112.0, v0.113.0 Apr 15, 2023
@evanescente-ondine
Copy link

I would like to implement this API if possible on Pull Request

Has something been done by someone, that I could test ? I ask since I recently felt the need for a pretty heavy use of such feature, if it had been there...
Yours

@bep bep closed this as completed May 19, 2023
@bep bep reopened this May 19, 2023
@bep bep modified the milestones: v0.113.0, v0.114.0, v0.115.0 Jun 8, 2023
@bep bep modified the milestones: v0.115.0, v0.116.0 Jun 30, 2023
@bep bep modified the milestones: v0.116.0, v0.117.0 Aug 1, 2023
@bep bep modified the milestones: v0.117.0, v0.118.0 Aug 30, 2023
@bep bep modified the milestones: v0.118.0, v0.119.0 Sep 15, 2023
@bep bep modified the milestones: v0.119.0, v0.120.0 Oct 5, 2023
@bep bep modified the milestones: v0.120.0, v0.121.0 Oct 31, 2023
@bep bep removed this from the v0.121.0 milestone Dec 6, 2023
@bep bep added this to the v0.122.0 milestone Dec 6, 2023
@bep bep modified the milestones: v0.122.0, v0.123.0, v0.124.0 Jan 27, 2024
@bep bep modified the milestones: v0.124.0, v0.125.0 Mar 4, 2024
@jmooring jmooring added the Stale label Apr 4, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants