Documentation
¶
Overview ¶
Package fetchpriority defines the FetchPriority type and its predefined values.
Resource loading priority hint for browser optimization. Helps browsers prioritize critical resources for better user experience and perceived performance.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // High High priority resource loading. Browser should prioritize this resource over others. // Best for hero images, above-the-fold content, and critical visual elements. High = FetchPriority("high") // Low Low priority resource loading. Browser should deprioritize this resource. // Suitable for below-the-fold images, decorative elements, and non-critical content. Low = FetchPriority("low") // Auto Automatic priority based on browser heuristics and resource context. Default // behavior that lets browser determine optimal loading priority. Auto = FetchPriority("auto") )
Variables for FetchPriority values
Functions ¶
This section is empty.
Types ¶
type FetchPriority ¶
type FetchPriority []byte
FetchPriority is a typed value for the HTML fetchpriority attribute.
Resource loading priority hint for browser optimization. Helps browsers prioritize critical resources for better user experience and perceived performance.
func Custom ¶
func Custom(value string) FetchPriority
Custom allows setting a custom FetchPriority value for edge cases or future specifications. Use this when the predefined constants don't cover your specific use case.