Linkedin iOS App in-App browser not allowing to donwload zip files

Viewed 372

I'm having an issue with a website I built. If someone click on a post linking to my website, the iOS App opens the site in the in-App browser. When click on a link in the website to download a zip file, the browser attempts to open the file as text and you only see garbled text.

I tested it on the Android app and it works fine there.

Any advice is Welcomed. Do we need to report this as a bug in LinkedIn? Has anyone found anything related to this in the official LinkedIn documentation (I haven't).


My short term solution is to detect if the user is browsing on IOS using the LinkedIn App with this code:

Having a link

<a id="download-file" href="...my-download.zip" download>Download your report</a>

Javascript:

const isIOS = typeof navigator !== 'undefined' && (/iPhone|iPad|iPod/i.test(navigator.userAgent));
const isLinkedinApp = typeof navigator !== 'undefined' && (/LinkedInApp/i.test(navigator.userAgent));

if (isIOS && isLinkedinApp) {
      document.getElementById("download-report").remove();
}
0 Answers
Related