function initial_fetch(resource, opts) {
	const selector = build_selector(resource, opts);

	const script = document.querySelector(selector);
	if (script?.textContent) {
		let { body, ...init } = JSON.parse(script.textContent);

		const ttl = script.getAttribute('data-ttl');
		if (ttl) cache.set(selector, { body, init, ttl: 1000 * Number(ttl) });
		const b64 = script.getAttribute('data-b64');
		if (b64 !== null) {
			// Can't use native_fetch('data:...;base64,${body}')
			// csp can block the request
			body = b64_decode(body);
		}

		return Promise.resolve(new Response(body, init));
	}

	return DEV ? dev_fetch(resource, opts) : window.fetch(resource, opts);
}
Should be called on the initial run of load functions that hydrate the page.
Saves any requests with cache-control max-age to the cache.
@param {URL | string} resource
@param {RequestInit} [opts]