Before iOS 9, one way to check whether an app was installed on the iPhone from javascript was to use a custom URI scheme followed by a timeout:
window.locatio