I have an iPhone Web App, and I\'m interested in detecting if the app was loaded either from:
This is what I use, works great:
if (window.navigator.userAgent.indexOf('iPhone') != -1) {
if (window.navigator.standalone == true) {
alert("Yes iPhone! Yes Full Screen!");
} else {
alert("Not Full Screen!");
};} else {
alert("Not iPhone!");
document.location.href = 'please-open-from-an-iphone.html';
};