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:
12
index.html
12
index.html
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user