Unexpected Safari useragent for www.espn.com, fixed when disabling site-specfic hacks

Recently we started noticing in Safari v18.2 browser an unexpected useragent set for https://www.espn.com pages like -

"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" (recognized as Chrome by most UA detection logic) and breaks our video playback in some scenarios.

When digging into this we came across site specific quirks and the "Disable site-specific hacks" setting which fixed the playback functionality and set a more expected UA - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Safari/605.1.15".

Is the unexpected UA being set somewhere in Safari/Webkit? Can this be removed so site functionality works without needing to find the "Disable site-specific hacks" setting?

Hi,

Yes. There is a UA override which has been created a couple of months ago, ~10 months ago and released to Safari on a release on April 2024.

Steps to reproduce at the time: 0) Launch Safari

  1. Open espn.com
  2. Select Espn+ and log in
  3. Select a show - eg Tryouts or OJ Made in America
  4. Let stream start to play
  5. Seek ahead or jump 10s forward
  • RESULTS:

Playback fails with error page from espn

At that time, the Chrome UA fixed the issue. The WebKit team tried to contact ESPN/Disney without success. rdar://127140895

Let's work together on removing it. Let's open a bug on https://bugs.webkit.org/ for it. You can contact me directly there.

I opened https://bugs.webkit.org/show_bug.cgi?id=288247

Thanks for raising the issue.

Thank you Karl. I will follow up with you on the bug you opened

Unexpected Safari useragent for www.espn.com, fixed when disabling site-specfic hacks
 
 
Q