I want to target an ipad device in javascript. I know it is possible to do this with user agent string parsing. But this is easy to fake.
I also read that it's better to do a functionality test. like if(window.matchMedia)
rather than if (userAgent.indexOf('ipad'))
but still some functions exist in new browsers.
Is there anything that returns the word ipad in the browser ? thank you.