Home / Type/ PrefetchOptions Type — astro Architecture

PrefetchOptions Type — astro Architecture

Architecture documentation for the PrefetchOptions type/interface in index.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  4a27f585_5650_38e3_e723_83375dce2e83["PrefetchOptions"]
  315e53ea_6d34_137c_ce5c_8c89aca90db9["index.ts"]
  4a27f585_5650_38e3_e723_83375dce2e83 -->|defined in| 315e53ea_6d34_137c_ce5c_8c89aca90db9
  style 4a27f585_5650_38e3_e723_83375dce2e83 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/prefetch/index.ts lines 190–203

export interface PrefetchOptions {
	/**
	 * Should prefetch even on data saver mode or slow connection. (default `false`)
	 */
	ignoreSlowConnection?: boolean;
	/**
	 * A string providing a hint to the browser as to how eagerly it should prefetch/prerender link targets in order to balance performance advantages against resource overheads. (default `immediate`)
	 * Only works if `clientPrerender` is enabled and browser supports Speculation Rules API.
	 * The browser takes this hint into consideration along with its own heuristics, so it may select a link that the author has hinted as less eager than another, if the less eager candidate is considered a better choice.
	 *
	 * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/speculationrules#eagerness
	 */
	eagerness?: 'immediate' | 'eager' | 'moderate' | 'conservative';
}

Frequently Asked Questions

What is the PrefetchOptions type?
PrefetchOptions is a type/interface in the astro codebase, defined in packages/astro/src/prefetch/index.ts.
Where is PrefetchOptions defined?
PrefetchOptions is defined in packages/astro/src/prefetch/index.ts at line 190.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free