-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
svelte:head does not remove title tag #7656
Comments
I think thats on purpose, because when you would remove the title, without setting a new one the page would have no title at all. So the only way to change the title is to set a new one. |
This actually blocks fallback titles, maybe we can (at least) remove the title when one is present in a parent, like: <!-- src/routes/+layout.svelte -->
<svelte:head>
<title>Fallback</title>
</svelte:head> <!-- src/routes/+page.svelte -->
<svelte:head>
<title>Home</title>
</svelte:head>
<a href="/404">Go to 404 page</a> Give the above example a direct call to "/404" will result in the title "Fallback" while a call using CSR will result in the old title "Home" still being displayed instead of the fallback one. |
Describe the bug
A title tag added using
<svelte:head>
, cannot be removed? like you can with any other tag i have tested (meta, script).Reproduction
Relevant repl: https://svelte.dev/repl/2ecf81b43d0d4b2eaa02d80adf803929?version=3.48.0
Logs
No response
System Info
Windows 10, Firefox & Edge, svelte repl 3.48.0
Severity
annoyance
The text was updated successfully, but these errors were encountered: