Reputation: 4368
So i'm trying to download a image, I use window.location = data.url;
which points to the file the image however, in iOS it sends it to the actual image where you need to tap and hold to save.
I know there's no way around this however, I feel it breaks the journey so wanted to just direct them to another page I create with the image and text saying "tap and hold" so the user knows.
I had a look at the documentation but got lost. How can I detect if someone is using an iOS device?
Upvotes: 5
Views: 5932
Reputation: 3871
Modernizr is all about feature detection
, not device/browser detection via UA string sniffing.
Device/browser detection is a bad guy for some time and it's unlikely for this to change - it's been proved that it is unreliable for multiple reasons.
However, if you are determined to go this way, I can suggest you to check out isMobile - a simple javascript lib for mobile device detection.
Upvotes: 5