---
title: "Comment by StackShortlist on \"Open Graph Tags in a React + Vite SPA: Why Crawlers See Your App Shell, and Three Ways to Fix It\" | Hashnode"
description: "The edge function approach is a nice middle ground, since it only rewrites the head for crawler user agents and leaves the SPA untouched for everyone else. One"
url: "https://hashnode.com/posts/open-graph-tags-in-a-react-vite-spa-why-crawlers-see-your-app-shell-and-three-ways-to-fix-it/6ad1d8df805838e2d93d7ce3/comment/6ad2ab1cff3a3473c2720d31"
---

[Discussion](https://hashnode.com/posts/open-graph-tags-in-a-react-vite-spa-why-crawlers-see-your-app-shell-and-three-ways-to-fix-it/6ad1d8df805838e2d93d7ce3)

Comment [Open Graph Tags in a React + Vite SPA: Why Crawlers See Your App Shell, and Three Ways to Fix It](https://hashnode.com/posts/open-graph-tags-in-a-react-vite-spa-why-crawlers-see-your-app-shell-and-three-ways-to-fix-it/6ad1d8df805838e2d93d7ce3)

[StackShortlist](https://hashnode.com/@veristria)

[Oct 16](https://hashnode.com/posts/open-graph-tags-in-a-react-vite-spa-why-crawlers-see-your-app-shell-and-three-ways-to-fix-it/6ad1d8df805838e2d93d7ce3/comment/6ad2ab1cff3a3473c2720d31)

The edge function approach is a nice middle ground, since it only rewrites the head for crawler user agents and leaves the SPA untouched for everyone else. One gotcha is caching: Slack, LinkedIn and Facebook all cache the card aggressively, so testing with their debug tools and forcing a rescrape saves a lot of confusion. Setting og:image dimensions explicitly also helps some platforms render the large card on the first share.
