I have an app, and I\'d like to redirect the users to different pages based on where they are navigating from.
If navigating from web clip, do not redirect. If navig
Seeing all the answers, here are some tips about the proposed RegExes:
AppleWebKit matches Desktop Safari too (not only mobile).match more than once for such simple regexes, and prefer the lighter .test method.g (global) regex flag is useless while the i (case insensitive) can be usefulI'm just using this since getting true for mobile Chrome is OK for me (same behavior):
/iPhone|iPad|iPod/i.test(navigator.userAgent)
(I just want to detect if the device is a target for an iOS app)