apply_filters( 'riff_app_precache', string[] $urls )

Filters what the installed Listen app's service worker keeps on the device, so it is there offline and on every launch after the first: a host's fonts that the first paint doesn't show, say. The fonts riff_app_preload_fonts returns are already in it.

Parameters

$urlsstring[]
Addresses: the first paint's fonts, then Riff's stylesheets and its script modules.

More Information

Only these addresses are answered from the device; every other request goes to the network as before. An address on another host needs CORS. Return an empty array for no service worker at all.

Usage

add_filter( 'riff_app_precache', function ( $urls ) {
	return $urls;
} );

Source

$filtered = apply_filters( 'riff_app_precache', $urls );

Changelog

VersionDescription
6.6.0Introduced.