Once they fonts are downloaded, they will be cached until you manually empty the cache. If you’re doing this then you’re effectively forcing a cold start each and every time which is terrible from a performance perspective.
And it taking 5 minutes from a CDN doesn’t make sense since they are on the edge closest to you (Cloudflare). So if you block them or whatever then good luck.
And you don’t have to completely disable or remove fonts, just set them load async so that the initial poll is sent on load and then once its fetch is complete the fonts just ‘snap in’.
I am not familiar with localCDN but if that is what is what is caching and its taking 5 minutes, its either running with enough horse power of a covid tester, or its timing out after a long wait. Leading me to think of a misconfiguration in some settings.
Just to prove a point: here is the unminified source code from the highlighted area of your screenshot. I thought we could take a look together.:
define("discourse/plugins/spoiler-alert/initializers/spoiler-alert", ["exports", "discourse/lib/plugin-api", "discourse/lib/to-markdown", "discourse/plugins/spoiler-alert/lib/apply-spoiler"], function (e, i, t, r) {
"use strict";
function l(e) {
e.querySelectorAll(".spoiler").forEach((e) => {
e.classList.remove("spoiler"), e.classList.add("spoiled"), (0, r.default)(e);
});
}
function o(e) {
e.decorateCookedElement(l, { id: "spoiler-alert" }),
e.addComposerToolbarPopupMenuOption({
icon: "magic",
label: "spoiler.title",
action: (e) => {
e.applySurround("[spoiler]", "[/spoiler]", "spoiler_text", { multiline: !1, useBlockMode: !0 });
},
}),
(0, t.addTagDecorateCallback)(function () {
"spoiled" === this.element.attributes.class && ((this.prefix = "[spoiler]"), (this.suffix = "[/spoiler]"));
}),
(0, t.addBlockDecorateCallback)(function (e) {
const { name: i, attributes: t } = this.element;
if ("div" === i && "spoiled" === t.class) return (this.prefix = "[spoiler]"), (this.suffix = "[/spoiler]"), e.trim();
});
}
Object.defineProperty(e, "__esModule", { value: !0 }), (e.default = void 0), (e.initializeSpoiler = o);
e.default = {
name: "spoiler-alert",
initialize(e) {
e.lookup("service:site-settings").spoiler_enabled && (0, i.withPluginApi)("1.15.0", o);
},
};
}),
define("discourse/plugins/spoiler-alert/lib/apply-spoiler", ["exports", "discourse-i18n"], function (e, i) {
"use strict";
Object.defineProperty(e, "__esModule", { value: !0 }),
(e.default = function (e) {
l(e),
e.addEventListener("click", (i) => {
o(i, e);
}),
e.addEventListener("keydown", (i) => {
"Enter" === i.key && o(i, e);
});
});
const t = ["a", "area", "audio", "button", "details", "embed", "iframe", "img.animated", "input", "map", "object", "option", "portal", "select", "textarea", "track", "video", ".lightbox"].join(", ");
function r(e, i) {
Object.entries(i).forEach((i) => {
let [t, r] = i;
null === r ? e.removeAttribute(t) : e.setAttribute(t, r);
});
}
function l(e) {
r(e, { role: "button", tabindex: "0", "data-spoiler-state": "blurred", "aria-expanded": !1, "aria-label": i.default.t("spoiler.label.show"), "aria-live": "polite" }),
e.classList.add("spoiler-blurred"),
Array.from(e.children).forEach((e) => {
e.setAttribute("aria-hidden", !0);
});
}
function o(e, i) {
"blurred" === i.getAttribute("data-spoiler-state")
? ((function (e) {
r(e, { "data-spoiler-state": "revealed", "aria-expanded": !0, "aria-label": null, role: null }),
e.classList.remove("spoiler-blurred"),
Array.from(e.children).forEach((e) => {
e.removeAttribute("aria-hidden");
});
})(i),
e.preventDefault())
: (function (e) {
return e.defaultPrevented || e.target.closest(t);
})(e) ||
window.getSelection() + "" != "" ||
l(i);
}
}),
define("discourse/plugins/spoiler-alert/lib/discourse-markdown/spoiler-alert", ["exports"], function (e) {
"use strict";
Object.defineProperty(e, "__esModule", { value: !0 }),
(e.setup = function (e) {
e.allowList(["span.spoiler", "div.spoiler"]),
e.markdownIt
? (function (e) {
e.registerOptions((e, i) => {
e.features["spoiler-alert"] = !!i.spoiler_enabled;
}),
e.registerPlugin((e) => {
e.inline.bbcode.ruler.push("spoiler", { tag: "spoiler", wrap: "span.spoiler" }), e.block.bbcode.ruler.push("spoiler", { tag: "spoiler", wrap: "div.spoiler" });
});
})(e)
: e.addPreProcessor(r);
});
const i = /\n|<img|!\[[^\]]*\][(\[]/;
function t(e, t) {
const r = i.test(t) ? "div" : "span";
return `<${r} class='spoiler'>${t}</${r}>`;
}
function r(e) {
let i;
e ||= "";
do {
(i = e), (e = e.replace(/\[spoiler\]((?:(?!\[spoiler\]|\[\/spoiler\])[\S\s])*)\[\/spoiler\]/gi, t));
} while (e !== i);
return e;
}
});
//# sourceMappingURL=spoiler-alert-c117d91598beb6e547891e4e9fb9c1d814ecb4547858e57c0f253e10f8ca0521.map
//!