rel

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Stylesheet CSS stylesheet resource for styling the document. Browser will load and apply CSS
	// rules to the current page for visual presentation and layout.
	Stylesheet = Rel("stylesheet")

	// Icon Icon resource representing the document or site. Displayed in browser tabs, bookmarks,
	// and application interfaces. Supports various image formats and sizes.
	Icon = Rel("icon")

	// Preload High-priority resource to load early in page lifecycle. Browser fetches resource
	// immediately for later use. Requires 'as' attribute for resource type specification.
	Preload = Rel("preload")

	// Prefetch Low-priority resource likely to be needed in future navigation. Browser may fetch
	// resource during idle time for performance optimization of subsequent pages.
	Prefetch = Rel("prefetch")

	// DnsPrefetch Resolve DNS for external domain before resource is actually needed. Reduces connection
	// latency for future requests to the specified domain.
	DnsPrefetch = Rel("dns-prefetch")

	// Preconnect Establish early connection to external origin including DNS, TCP, and TLS negotiation.
	// Optimizes performance for resources from third-party domains.
	Preconnect = Rel("preconnect")

	// Canonical Preferred URL for current content to prevent duplicate content issues. Tells search
	// engines which URL to index when multiple URLs have similar content.
	Canonical = Rel("canonical")

	// Alternate Alternative representation of current document. May specify different language, format,
	// or media type version of the same content for accessibility and internationalization.
	Alternate = Rel("alternate")

	// Prev Previous document in a sequence or series. Helps users and search engines understand
	// document relationships and navigate through sequential content.
	Prev = Rel("prev")

	// Next Next document in a sequence or series. Enables prefetching and provides navigation
	// hints for sequential content like articles or pagination.
	Next = Rel("next")

	// Help Help documentation or support resource related to current document. Provides contextual
	// assistance and user guidance for the current page or application.
	Help = Rel("help")

	// License Copyright license covering current document content. Legal information about content
	// usage rights and redistribution terms for the document.
	License = Rel("license")

	// Manifest Web app manifest file containing metadata about the application. Enables progressive
	// web app features like installation and offline capabilities.
	Manifest = Rel("manifest")

	// ModulePreload JavaScript module to preload for improved performance. Browser fetches and compiles
	// ES modules early in the page lifecycle for faster execution.
	ModulePreload = Rel("modulepreload")

	// AppleTouchIcon Apple-specific icon for iOS devices. Used when users add website to home screen
	// or bookmark on Apple devices. Supports various sizes and resolutions.
	AppleTouchIcon = Rel("apple-touch-icon")
)

Variables for Rel values

Functions

This section is empty.

Types

type Rel

type Rel []byte

Rel Link relationship between current document and linked resource. Defines semantic meaning and helps browsers optimize resource loading, security, and user experience.

func Custom

func Custom(value string) Rel

Custom allows setting a custom Rel 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