-
SummaryHello, I have multi tenant nextjs app and I wanna serve project specific metadata in the head of the [domain]/layout.tsx file. I saw that nextjs streams the metadata so that initial page comes in faster but my title and favicon are now showing up in the browser tab until minutes later which is a problem. How to fix that? Should I downgrade my version or is there any other workaround? Here is my relevant code that serves the data: here is the site that should have title instead of the url in the browser tab: https://test.brochurify.app/ Any help is appreciated. Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Do you observe the same if you upgrade to latest? 15.3.5 |
Beta Was this translation helpful? Give feedback.
-
You're seeing this delay because Next.js streams the layout before async metadata (like title and favicon) finishes loading. To fix it, move your metadata logic into the generateMetadata function. It runs before streaming, so the browser gets the correct title and favicon immediately. layout.tsx export const dynamic = 'force-dynamic'; import { Metadata } from 'next'; export async function generateMetadata({ params }): Promise { return { export default function Layout({ children }: { children: React.ReactNode }) { No need to downgrade Next.js — this is the correct fix. |
Beta Was this translation helpful? Give feedback.
Do you observe the same if you upgrade to latest? 15.3.5