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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With