admin管理员组文章数量:1394217
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?
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?
Share Improve this question asked Mar 30, 2016 at 11:05 pourmesomecodepourmesomecode 4,36812 gold badges53 silver badges91 bronze badges1 Answer
Reset to default 5Modernizr 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.
本文标签: javascriptUsing modernizr to detect iOS devicesStack Overflow
版权声明:本文标题:javascript - Using modernizr to detect iOS devices - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744631935a2616591.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论