fetchpriority

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL