title: What Javascript event gets fired when iOS Safari gets called from another app
body: <p>I'm working on a mobile website / iPhone app combination.  Upon entering the mobile website, I prompt the user to 'go to the app', 'download the app', or 'use mobile website'.</p>
  <p>From various entry points to the mobile website, I'm mostly worried about verification emails and text messages, so the user will check email, follow the verification link, enter Safari, get prompted to 'go to the app' and the verification link is sent to the app for it to handle.</p>
  <p>Now in the same session, if the user gets another email regarding the app, the user will check email again, follow a different verification link to Safari, and I want the 'go to the app' to work the same with the new link.</p>
  <p>Some quirks are that upon entering the mobile website, the verification link is stored and the URL is switched to example.com/home.  The iPhone overlay is completely separate from the rest of the site and doesn't have access to the site's storage of the verification link so the event needs to fire as soon as the site loads.  This works when first loading the page, but upon re-entering the second time, I need to listen to event that triggers as soon as iOS Safari re-enters.  I've tried listening to &quot;pageshow&quot; but by that time, the URL is already example.com/home.</p>