diff --git a/frontend/index.html b/frontend/index.html
index eefd45b..89dcf1f 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -84,6 +84,7 @@
+ __TSS_PRELOAD_LINKS__
diff --git a/server.cjs b/server.cjs
index abee758..3104151 100644
--- a/server.cjs
+++ b/server.cjs
@@ -2329,6 +2329,26 @@ function routeStructuredData(origin, seo, canonicalUrl) {
])
}
+function routePreloadLinks(pathname) {
+ const hrefs = []
+
+ if (pathname === '/') {
+ hrefs.push('/api/tss/leaderboard/teams?limit=4')
+ hrefs.push('/api/tss/games/recent?limit=50')
+ } else if (pathname === '/teams') {
+ hrefs.push('/api/tss/leaderboard/teams?limit=100')
+ } else if (pathname === '/players') {
+ hrefs.push('/api/tss/leaderboard/players?limit=100')
+ } else if (pathname === '/battle-logs' || pathname === '/live') {
+ hrefs.push('/api/tss/games/recent?limit=50')
+ hrefs.push('/api/tss/leaderboard/teams?limit=100')
+ }
+
+ return hrefs
+ .map((href) => ``)
+ .join('\n ')
+}
+
function htmlWithSeo(req, data) {
const origin = pagePublicOrigin(req)
let pathname = '/'
@@ -2349,6 +2369,7 @@ function htmlWithSeo(req, data) {
.replaceAll('__SEO_ROBOTS__', escapeHtml(seo.robots))
.replaceAll('__SEO_CANONICAL__', escapeHtml(canonicalUrl))
.replaceAll('__SEO_JSON_LD__', routeStructuredData(origin, seo, canonicalUrl).replace(/