Persist the show-type filter in the path via a /series prefix: movies
keep bare URLs, series use /series across random, popular, top,
favorites and watchlist. The path is the single source of truth - the
jotai atom is removed and the toggle navigates with router.replace so
the server prefetches the target variant. Legacy ?type=tv deep links
redirect to the prefixed URLs.
Trending and similar/recommendations queries are now paginated and feed
useInfiniteList like the main lists. Gallery wires fetchNextPage to a
new ScrollNavigation onEndReached callback (fires within two slides of
the end, once per approach), so all gallery tabs load more on scroll.
The show page prefetches the first similar page with
prefetchInfiniteQuery, and trending/similar/recommendations are added
to the analytics ListName.
Following links reached only 37 of 1873 urls and the frontier was exhausted
at depth 3, because detail pages rendered no internal links server side.
- Prefetch similar shows on detail pages so their links land in the ssr html.
Crawl reach goes from 37 pages to 782 and keeps growing. Credits are left
client side on purpose: dehydrating aggregate_credits pushed a series page
from 52kb to 600kb to surface only ten person links.
- Replace the aria-label on poster links with sr-only text, so the anchors
carry real anchor text instead of being empty. Text content is also a
better accessible name than aria-label.
- Give popular and top their own openGraph and twitter tags. They inherited
the generic homepage title and description.
- Add og:image:alt on movie, tv and person pages.
- Add ItemList json-ld to the listing pages.
- Drop favorites, watchlist and opengraph-image from the sitemap, and remove
the robots.txt disallow that kept crawlers from reading their noindex.
- Raise detail revalidate to a week. Cast and release dates barely move, and
it cuts regenerations, isr writes and origin transfer sevenfold now that
more pages get crawled.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Three exceeded Vercel free tier limits (edge requests, function invocations,
fast origin transfer) all traced back to nothing being cached.
- Http defaults preventCache to false and the tmdb proxy now sends a real
Cache-Control, so public responses are edge cached instead of missing on
every request. Session scoped calls keep private, no-store.
- On the server movieAdvisor talks to tmdb directly. It used to fetch its own
public /api/tmdb url, billing a second edge request, a second function
invocation and the whole payload as origin transfer per server render.
- Add generateStaticParams to movie, tv and person pages. Without it Next
treats the segment as fully dynamic and ignores revalidate, so the pages
re-rendered on every request instead of using ISR.
- Trim credits and person payloads in the proxy: credits 72kb to 13kb,
aggregate_credits 308kb to 102kb, person 191kb to 124kb. Only fields no
mapper reads are dropped, mapped output is unchanged.
- Detail pages are cached now, so only a real tmdb 404 becomes notFound and
other failures bubble up instead of being baked in as a 404 for a day.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>