What is the strategy to SSR the App Shell of my PWA when my SEO metadata is dynamic per route? For instance, on the /home
route, I want just a title:
<title>Shop - Home</title>
while on /search
, I want to add a description:
<title>Shop - Search</title>
<meta name="description" content="Search results" />
The issue is if I include this into my SSRd App Shell, my service worker will cache that specific page's version of the app shell. I also still want my metadata to change depending on the route my user is currently on. For this, I am using React Helmet. We are also using Prerender to cache each page on our app for SEO that will read our page's SSR metadata.