Skip to main content
Module

x/prefetch/mod.ts>Options

A Fresh plugin for prefetching pages
Go to Latest
interface Options
import { type Options } from "https://deno.land/x/prefetch@0.0.3/mod.ts";

Properties

optional
priority: boolean

Attempt higher priority fetch (low or high)

optional
origins: string[]

Allowed origins to prefetch (empty allows all)

optional
timeout: number

Timeout after which prefetching will occur

optional
throttle: number

The concurrency limit for prefetching

optional
threshold: number

The area percentage of each link that must have entered the viewport to be fetched

optional
limit: number

The total number of prefetches to allow

optional
delay: number

Time each link needs to stay inside viewport before prefetching (milliseconds)

optional
prerender: boolean

Option to switch from prefetching and use prerendering only

optional
prerenderAndPrefetch: boolean

Option to use both prerendering and prefetching