Type Alias StaticRoute
StaticRoute: Omit<RouteCommon, "scope" | "persist" | "mode" | "retention"> & {
load?: undefined;
mode?: undefined;
persist?: undefined;
scope?: undefined;
strategy: "static";
}
load?: undefined;
mode?: undefined;
persist?: undefined;
scope?: undefined;
strategy: "static";
}
Type Declaration
-
Optionalload?: undefinedalways absent; a static route has no load
-
Optionalmode?: undefinedalways absent; a static route has no mode
-
Optionalpersist?: undefinedalways absent; a static route is always kept
-
Optionalscope?: undefinedalways absent; a static route is public
-
strategy: "static"
the file's response, stored and shown with no request
A route for a file the application serves as is, such as a page or an asset with fixed bytes. The worker stores the response it fetched and shows it with no request until a tag in
dependschanges or the freshness bound passes. It has noload, is always public, and is answered inservemode only.