I have an iPhone Web App, and I\'m interested in detecting if the app was loaded either from:
You can detect the mode via Javascript as described above - or you can use PHP and the user agent.
if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),"iphone")) {
if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']),"safari")) {
echo('Running in browser on iPhone');
}else{
echo('Running as stand alone WebApp on iPhone');
}
}else{
echo('Running on device other than iPhone.');
}
?>
Enjoy!