Social Cache Busting: Forcing Fresh Previews on Shared Links
The piece introduces “social cache busting,” a technique for sidestepping the aggressive caching that platforms like Twitter, Facebook, Slack, and iMessage apply to Open Graph previews. Once a URL has been scraped, those services hold onto the original title, description, and image — often for days or indefinitely — which is painful when a post goes out with a typo, the wrong image, or stale metadata. Appending a throwaway query string (or any URL variant the server still resolves) is enough to make the platform treat the link as new and re-fetch the preview.
The trick works because most link unfurlers key their cache on the exact URL string rather than on canonical form or content hash. That makes a one-character change sufficient to bypass the cache without changing what the user actually sees on the destination page. It’s a low-effort fix for anyone publishing under their own domain, and a useful reminder that social platforms’ preview pipelines are far less sophisticated than their scale suggests.
The broader takeaway is about ownership of presentation. If you control the canonical URL and the Open Graph tags, you can shape how a link looks across every channel that scrapes it — but only if you can force a refresh when you need one. Cache busting via query parameters is the pragmatic escape hatch when platforms give you no manual “re-scrape” button.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.