The issue concerns a bad inline onebox title for Spotify album links, where the title displays as ‘Unsupported browser’ instead of the album name. supermathie identifies that the discrepancy arises because the full onebox uses a custom user agent (‘Discourse Forum Onebox v3.5.0.beta9-dev’) that receives the correct page, while the inline onebox uses an outdated Safari 14 user agent, causing Spotify to return an unsupported browser page. awesomerobot questions whether updating the user agent would help. supermathie confirms the inconsistency and notes that despite Spotify serving Open Graph metadata, the system prioritizes the <title> tag, which shows ‘Unsupported browser’. sam explains that the current code prioritizes the <title> over Open Graph properties and references a pull request that should fix it. sam adds that Spotify now returns a generic title ‘spotify’, suggesting custom Spotify-specific handling may be needed.
and Spotify is fine with this and serves the full page:
○ → curl -s --user-agent 'Discourse Forum Onebox v3.5.0.beta9-dev' 'https://open.spotify.com/album/1nrWysWdrgPR0kBJ45z2aS?si=FurcwGpfSrWJBPGwKeCvDQ' | htmlq 'meta[property^="og:description"], meta[property^="og:site_name"], title'
<title>The First Symphony - Album by Indecent | Spotify</title>
<meta content="Spotify" property="og:site_name">
<meta content="Indecent · Album · 2024 · 12 songs" property="og:description">
<meta content="Spotify" property="og:site_name">
but for the inline onebox we use:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15
So that’s ultimately why we’re getting different behaviour, though I would still ask why we don’t use the opengraph properties here? Spotify is still serving those up despite being an unsupported browser:
○ → curl -s --user-agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15' 'https://open.spotify.com/album/1nrWysWdrgPR0kBJ45z2aS?si=FurcwGpfSrWJBPGwKeCvDQ' | htmlq 'meta[property^="og:description"], meta[property^="og:site_name"], title'
<title>Unsupported browser</title>
<meta content="Spotify" property="og:site_name">
<meta content="Indecent · Album · 2024 · 12 songs" property="og:description">
<meta content="Spotify" property="og:site_name">
all properties
○ → curl -s --user-agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15' 'https://open.spotify.com/album/1nrWysWdrgPR0kBJ45z2aS?si=FurcwGpfSrWJBPGwKeCvDQ' | htmlq 'meta[property^="og:"]'
<meta content="Spotify" property="og:site_name">
<meta content="The First Symphony" property="og:title">
<meta content="Indecent · Album · 2024 · 12 songs" property="og:description">
<meta content="https://open.spotify.com/album/1nrWysWdrgPR0kBJ45z2aS" property="og:url">
<meta content="music.album" property="og:type">
<meta content="Spotify" property="og:site_name">
<meta content="AR" property="og:restrictions:country:allowed">
…
<meta content="XK" property="og:restrictions:country:allowed">
<meta content="https://i.scdn.co/image/ab67616d0000b273ff9434b9650f38d183e91fb1" property="og:image">