Codesnipp.it Social Code Sharing

Claudio Ortolina

How to detect if a webapp is run inside Safari or the Home Screen

by Claudio Ortolina on Nov 29, 2010

/*native code, no libraries required. This is useful to display a notice that invites the user to install the app.*/ if (navigator.standalone) { //the application is run from the home screen } else { //the application is run from Safari }

Can't see the comments? Please login first :)