Statically set the base tag

Injecting the base tag via a script causes assets to be requested once from an invalid url and then again from the correct one after the base tag got injected.

Setting it statically won't cause any problems with the servers subpath injection, because the browser will just use the first base tag in case there are multiple.

fixes #1096
This commit is contained in:
schroda
2026-05-02 17:03:25 +02:00
parent e3babfed31
commit 5f7b18cf9a

View File

@@ -1,17 +1,7 @@
<!doctype html>
<html>
<head>
<script>
(() => {
if (document.querySelector('base')) {
return;
}
const base = document.createElement('base');
base.href = '/';
document.head.prepend(base);
})();
</script>
<base href="/" />
<title>Suwayomi</title>
<meta name="apple-mobile-web-app-title" content="Suwayomi" />
<meta name="description" content="A manga reader that runs tachiyomi's extensions" />